summaryrefslogtreecommitdiff
path: root/source/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-20 03:11:46 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-20 03:11:46 +0000
commit10303a78d4b12a03166db89202759cd745c516c5 (patch)
tree18e3c55cfc295e522da74d0f005e7b3976fa7679 /source/utils
parentdbe333b590ef004ccbd31a14ad161d73139b2486 (diff)
downloadsamba-10303a78d4b12a03166db89202759cd745c516c5.tar.gz
testparm now prints a warning if the lock directory doesn't have 0644
permissions.
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/testparm.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/utils/testparm.c b/source/utils/testparm.c
index 6f4ea23136c..c7cbab91b87 100644
--- a/source/utils/testparm.c
+++ b/source/utils/testparm.c
@@ -47,13 +47,24 @@ extern pstring myhostname;
void do_global_checks(void)
{
- if(lp_security() > SEC_SHARE && lp_revalidate(-1))
- printf("WARNING: the 'revalidate' parameter is ignored in all but \
+ struct stat st;
+ if (lp_security() > SEC_SHARE && lp_revalidate(-1)) {
+ printf("WARNING: the 'revalidate' parameter is ignored in all but \
'security=share' mode.\n");
+ }
- if( lp_wins_support() && *lp_wins_server() )
- printf("ERROR: both 'wins support = true' and 'wins server = <server>' \
+ if (lp_wins_support() && *lp_wins_server()) {
+ printf("ERROR: both 'wins support = true' and 'wins server = <server>' \
cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
+ }
+
+ if (!directory_exist(lp_lockdir(), &st)) {
+ printf("ERROR: lock directory %s does not exist\n",
+ lp_lockdir());
+ } else if ((st.st_mode & 0666) != 0644) {
+ printf("WARNING: lock directory %s should have permissions 0644 for browsing to work\n",
+ lp_lockdir());
+ }
}
int main(int argc, char *argv[])