From 852519282d43d7d12c103c01ca979952f041d683 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Aug 1998 03:11:46 +0000 Subject: testparm now prints a warning if the lock directory doesn't have 0644 permissions. (This used to be commit 10303a78d4b12a03166db89202759cd745c516c5) --- source3/utils/testparm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 6f4ea23136..c7cbab91b8 100644 --- a/source3/utils/testparm.c +++ b/source3/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 = ' \ + if (lp_wins_support() && *lp_wins_server()) { + printf("ERROR: both 'wins support = true' and 'wins 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[]) -- cgit