summaryrefslogtreecommitdiff
path: root/auth/ntlmssp
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-04-25 15:58:27 +0200
committerStefan Metzmacher <metze@samba.org>2016-04-28 16:51:17 +0200
commit7a2cb2c97611171613fc677a534277839348c56f (patch)
treeb5c21ba5e6c3c79aae7ca82555c5a7da05752508 /auth/ntlmssp
parentdb9c01a51975a0a3ec2564357617958c2f466091 (diff)
downloadsamba-7a2cb2c97611171613fc677a534277839348c56f.tar.gz
auth/ntlmssp: add ntlmssp_{client,server}:force_old_spnego option for testing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11849 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'auth/ntlmssp')
-rw-r--r--auth/ntlmssp/gensec_ntlmssp_server.c7
-rw-r--r--auth/ntlmssp/ntlmssp_client.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c
index 120c6e03315..99cedd06c37 100644
--- a/auth/ntlmssp/gensec_ntlmssp_server.c
+++ b/auth/ntlmssp/gensec_ntlmssp_server.c
@@ -133,6 +133,13 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
ntlmssp_state->force_old_spnego = false;
+ if (gensec_setting_bool(gensec_security->settings, "ntlmssp_server", "force_old_spnego", false)) {
+ /*
+ * For testing Windows 2000 mode
+ */
+ ntlmssp_state->force_old_spnego = true;
+ }
+
ntlmssp_state->neg_flags =
NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_VERSION;
diff --git a/auth/ntlmssp/ntlmssp_client.c b/auth/ntlmssp/ntlmssp_client.c
index b423f20cfbd..5edd5f4fce6 100644
--- a/auth/ntlmssp/ntlmssp_client.c
+++ b/auth/ntlmssp/ntlmssp_client.c
@@ -784,6 +784,9 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
ntlmssp_state->use_ntlmv2 = lpcfg_client_ntlmv2_auth(gensec_security->settings->lp_ctx);
+ ntlmssp_state->force_old_spnego = gensec_setting_bool(gensec_security->settings,
+ "ntlmssp_client", "force_old_spnego", false);
+
ntlmssp_state->expected_state = NTLMSSP_INITIAL;
ntlmssp_state->neg_flags =