summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-22 01:51:14 +0000
committerJeremy Allison <jra@samba.org>1998-05-22 01:51:14 +0000
commitd1d010a99526020f834f4a909bd24ce1c8f7993a (patch)
treec64e5f74c755e94a83f948630d478a0e299dc49d /source3/utils
parenta72bb5cb6eeec701530f307f590e82480c766bfe (diff)
downloadsamba-d1d010a99526020f834f4a909bd24ce1c8f7993a.tar.gz
samba-d1d010a99526020f834f4a909bd24ce1c8f7993a.tar.bz2
samba-d1d010a99526020f834f4a909bd24ce1c8f7993a.zip
Put a do_global_tests() function that will be expanded to
test all the heuristics we know about for validating smb.conf file. Jeremy. (This used to be commit 76dec5b04e9c3b4b727bf9a44d31acf32b4b6b4c)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/testparm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index f37c7376fd..c980fd1758 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -40,6 +40,22 @@ extern FILE *dbf;
extern int DEBUGLEVEL;
extern pstring myhostname;
+/***********************************************
+ Here we do a set of 'hard coded' checks for bad
+ configuration settings.
+************************************************/
+
+void do_global_checks(void)
+{
+ 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>' \
+cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
+}
+
int main(int argc, char *argv[])
{
pstring configfile;
@@ -76,6 +92,8 @@ extern pstring myhostname;
printf("Loaded services file OK.\n");
+ do_global_checks();
+
for (s=0;s<1000;s++)
if (VALID_SNUM(s))
if (strlen(lp_servicename(s)) > 8) {