summaryrefslogtreecommitdiffstats
path: root/source3/utils/testparm.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/utils/testparm.c
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.xz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/utils/testparm.c')
-rw-r--r--source3/utils/testparm.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 978ada26c65..721034dedff 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -39,7 +39,7 @@
Check if a directory exists.
********************************************************************/
-static bool directory_exist_stat(char *dname,SMB_STRUCT_STAT *st)
+static bool directory_exist_stat(const char *dname,SMB_STRUCT_STAT *st)
{
SMB_STRUCT_STAT st2;
bool ret;
@@ -77,7 +77,7 @@ cannot be set in the smb.conf file. nmbd will abort with this setting.\n");
ret = 1;
}
- if (strequal(lp_workgroup(), global_myname())) {
+ if (strequal(lp_workgroup(), lp_netbios_name())) {
fprintf(stderr, "WARNING: 'workgroup' and 'netbios name' " \
"must differ.\n");
ret = 1;
@@ -128,20 +128,35 @@ 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 );
+ fprintf(stderr, "ERROR: The setting 'security=%s' requires the 'password server' parameter be set\n"
+ "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' should NOT be combined with the 'password server' parameter.\n"
+ "(by default Samba will discover the correct DC to contact automatically).\n", sec_setting );
+ }
+
/*
* Password chat sanity checks.
*/
@@ -246,6 +261,11 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
fprintf(stderr,"WARNING: Maximum value for 'os level' is 255!\n");
}
+ if (strequal(lp_dos_charset(), "UTF8") || strequal(lp_dos_charset(), "UTF-8")) {
+ fprintf(stderr, "ERROR: 'dos charset' must not be UTF8\n");
+ ret = 1;
+ }
+
return ret;
}