summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/testparm.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 0e920ec696..edb11a6b05 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -128,17 +128,32 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
* 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()) {
const char *sec_setting;
if(lp_security() == SEC_SERVER)
sec_setting = "server";
else if(lp_security() == SEC_DOMAIN)
sec_setting = "domain";
+ else if(lp_security() == SEC_ADS)
+ sec_setting = "ads";
else
sec_setting = "";
fprintf(stderr, "ERROR: The setting 'security=%s' requires the 'password server' parameter be set \
-to a valid password server.\n", sec_setting );
+to the default value * or a valid password server.\n", sec_setting );
+ ret = 1;
+ }
+
+ if((lp_security() >= SEC_DOMAIN) && (strcmp(lp_passwordserver(), "*") != 0)) {
+ const char *sec_setting;
+ if(lp_security() == SEC_DOMAIN)
+ sec_setting = "domain";
+ else if(lp_security() == SEC_ADS)
+ sec_setting = "ads";
+ else
+ sec_setting = "";
+
+ fprintf(stderr, "WARNING: The setting 'security=%s' is should NOT be combined with the 'password server' parameter.\n (by default Samba will discover the correct DC to contact automatically).\n", sec_setting );
ret = 1;
}