Put a do_global_tests() function that will be expanded to
authorJeremy Allison <jra@samba.org>
Fri, 22 May 1998 01:51:14 +0000 (01:51 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 22 May 1998 01:51:14 +0000 (01:51 +0000)
test all the heuristics we know about for validating smb.conf
file.
Jeremy.
(This used to be commit 76dec5b04e9c3b4b727bf9a44d31acf32b4b6b4c)

source3/utils/testparm.c

index f37c7376fdfa707f5f78e6a026e909016a0b321d..c980fd175894a74767c3c53005add000ad820466 100644 (file)
@@ -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) {