/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Test validity of smb.conf
Copyright (C) Karl Auer 1993, 1994-1998
#include "includes.h"
#include "smb.h"
+extern BOOL AllowDebugChange;
+
/***********************************************
Here we do a set of 'hard coded' checks for bad
configuration settings.
int ret = 0;
SMB_STRUCT_STAT st;
- if (lp_security() == SEC_DOMAIN && !lp_encrypted_passwords()) {
+ if (lp_security() >= SEC_DOMAIN && !lp_encrypted_passwords()) {
printf("ERROR: in 'security=domain' mode the 'encrypt passwords' parameter must also be set to 'true'.\n");
ret = 1;
}
ret = 1;
}
+ if (!directory_exist(lp_piddir(), &st)) {
+ printf("ERROR: pid directory %s does not exist\n",
+ lp_piddir());
+ ret = 1;
+ }
+
/*
* Password server sanity checks.
*/
- if((lp_security() == SEC_SERVER || lp_security() == SEC_DOMAIN) && !lp_passwordserver()) {
+ if((lp_security() == SEC_SERVER || lp_security() >= SEC_DOMAIN) && !lp_passwordserver()) {
pstring sec_setting;
if(lp_security() == SEC_SERVER)
pstrcpy(sec_setting, "server");
/*
- * Check 'hosts equiv' and 'use rhosts' compatability with 'hostname lookup' value.
+ * Check 'hosts equiv' and 'use rhosts' compatibility with 'hostname lookup' value.
*/
if(*lp_hosts_equiv() && !lp_hostname_lookups()) {
ret = 1;
}
- if(lp_use_rhosts() && !lp_hostname_lookups()) {
- printf("ERROR: The setting 'use rhosts = yes' requires the 'hostname lookups = yes'.\n");
- ret = 1;
- }
-
-
/*
* Password chat sanity checks.
*/
}
}
+ if (strlen(lp_winbind_separator()) != 1) {
+ printf("ERROR: the 'winbind separator' parameter must be a single character.\n");
+ ret = 1;
+ }
+
+ if (*lp_winbind_separator() == '+') {
+ printf("'winbind separator = +' might cause problems with group membership.\n");
+ }
+
return ret;
}
dbf = x_stdout;
DEBUGLEVEL = 2;
+ AllowDebugChange = False;
printf("Load smb config files from %s\n",configfile);