summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-01-27 15:00:14 -0800
committerJeremy Allison <jra@samba.org>2011-01-27 15:26:47 -0800
commiteec50b21f6d74de4e69a2c649799452736a494b1 (patch)
tree541e8be57aabdf22020fe6af5576074f776b8533 /source3/param
parent5dd63c6c1439f5dde00e56144c38771d81455ada (diff)
downloadsamba-eec50b21f6d74de4e69a2c649799452736a494b1.tar.gz
samba-eec50b21f6d74de4e69a2c649799452736a494b1.tar.bz2
samba-eec50b21f6d74de4e69a2c649799452736a494b1.zip
Change "security=share" to downgrade to SMB1 from SMB2, rather than trying to fake it.
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index b45e045d64..3abebf4714 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5789,7 +5789,18 @@ FN_GLOBAL_INTEGER(lp_passwordlevel, &Globals.pwordlevel)
FN_GLOBAL_INTEGER(lp_usernamelevel, &Globals.unamelevel)
FN_GLOBAL_INTEGER(lp_deadtime, &Globals.deadtime)
FN_GLOBAL_BOOL(lp_getwd_cache, &Globals.getwd_cache)
-FN_GLOBAL_INTEGER(lp_maxprotocol, &Globals.maxprotocol)
+FN_GLOBAL_INTEGER(_lp_maxprotocol, &Globals.maxprotocol)
+int lp_maxprotocol(void)
+{
+ int ret = _lp_maxprotocol();
+ if ((ret == PROTOCOL_SMB2) && (lp_security() == SEC_SHARE)) {
+ DEBUG(2,("WARNING!!: \"security = share\" is incompatible "
+ "with the SMB2 protocol. Resetting to SMB1.\n" ));
+ lp_do_parameter(-1, "max protocol", "NT1");
+ return PROTOCOL_NT1;
+ }
+ return ret;
+}
FN_GLOBAL_INTEGER(lp_minprotocol, &Globals.minprotocol)
FN_GLOBAL_INTEGER(lp_security, &Globals.security)
FN_GLOBAL_LIST(lp_auth_methods, &Globals.AuthMethods)