summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-13 02:35:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:41 -0500
commit922e17105fbf12db2da535fed29395c9bf7f60c4 (patch)
tree8716ad86711857a964e7fa6b85e06cb26bff089a /source4/libcli/auth
parent871604e3101edfd4c17eec5b05077eeb5674b26b (diff)
downloadsamba-922e17105fbf12db2da535fed29395c9bf7f60c4.tar.gz
samba-922e17105fbf12db2da535fed29395c9bf7f60c4.tar.bz2
samba-922e17105fbf12db2da535fed29395c9bf7f60c4.zip
r2303: allow setting of many ntlmssp options from smb.conf or the command
line. This makes testing much easier. (This used to be commit 0a4723d250ba13e6374700fc6e80854ec6a3eddc)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/ntlmssp.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index 592656e880..f52f1ffbf9 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -938,10 +938,19 @@ NTSTATUS ntlmssp_server_start(struct ntlmssp_state **ntlmssp_state)
(*ntlmssp_state)->ref_count = 1;
(*ntlmssp_state)->neg_flags =
- NTLMSSP_NEGOTIATE_128 |
- NTLMSSP_NEGOTIATE_NTLM |
- NTLMSSP_NEGOTIATE_NTLM2 |
- NTLMSSP_NEGOTIATE_KEY_EXCH;
+ NTLMSSP_NEGOTIATE_NTLM;
+
+ if (lp_parm_bool(-1, "ntlmssp_server", "128bit", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_128;
+ }
+
+ if (lp_parm_bool(-1, "ntlmssp_server", "keyexchange", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_KEY_EXCH;
+ }
+
+ if (lp_parm_bool(-1, "ntlmssp_server", "ntlm2", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;
+ }
return NT_STATUS_OK;
}
@@ -1291,12 +1300,24 @@ NTSTATUS ntlmssp_client_start(struct ntlmssp_state **ntlmssp_state)
(*ntlmssp_state)->ref_count = 1;
(*ntlmssp_state)->neg_flags =
- NTLMSSP_NEGOTIATE_128 |
NTLMSSP_NEGOTIATE_NTLM |
- NTLMSSP_NEGOTIATE_NTLM2 |
- NTLMSSP_NEGOTIATE_KEY_EXCH |
NTLMSSP_REQUEST_TARGET;
+ if (lp_parm_bool(-1, "ntlmssp_client", "128bit", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_128;
+ }
+
+ if (lp_parm_bool(-1, "ntlmssp_client", "keyexchange", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_KEY_EXCH;
+ }
+
+ if (lp_parm_bool(-1, "ntlmssp_client", "ntlm2", True)) {
+ (*ntlmssp_state)->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;
+ } else {
+ /* apparently we can't do ntlmv2 if we don't do ntlm2 */
+ (*ntlmssp_state)->use_ntlmv2 = False;
+ }
+
return NT_STATUS_OK;
}