From d1d010a99526020f834f4a909bd24ce1c8f7993a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 22 May 1998 01:51:14 +0000 Subject: 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) --- source3/utils/testparm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 = ' \ +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) { -- cgit