From 19a05bf2f485023b11b41dfae3f6459847d55ef7 Mon Sep 17 00:00:00 2001 From: Steven Danneman Date: Thu, 8 Jan 2009 11:18:13 -0800 Subject: Make STATEDIR and CACHEDIR configurable through ./configure and loadparm.c If they are not explicitely set in either place both will default to LOCKDIR. Signed-off-by: Michael Adam --- source3/utils/testparm.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index da129cf7c0..e8458fda1b 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -66,6 +66,26 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n"); ret = 1; } + if (!directory_exist_stat(lp_statedir(), &st)) { + fprintf(stderr, "ERROR: state directory %s does not exist\n", + lp_statedir()); + ret = 1; + } else if ((st.st_mode & 0777) != 0755) { + fprintf(stderr, "WARNING: state directory %s should have permissions 0755 for browsing to work\n", + lp_statedir()); + ret = 1; + } + + if (!directory_exist_stat(lp_cachedir(), &st)) { + fprintf(stderr, "ERROR: cache directory %s does not exist\n", + lp_cachedir()); + ret = 1; + } else if ((st.st_mode & 0777) != 0755) { + fprintf(stderr, "WARNING: cache directory %s should have permissions 0755 for browsing to work\n", + lp_cachedir()); + ret = 1; + } + if (!directory_exist_stat(lp_piddir(), &st)) { fprintf(stderr, "ERROR: pid directory %s does not exist\n", lp_piddir()); -- cgit