svn commit: samba r2303 - in branches/SAMBA_4_0/source/libcli/auth: .

tridge at samba.org tridge at samba.org
Mon Sep 13 02:35:56 GMT 2004


Author: tridge
Date: 2004-09-13 02:35:55 +0000 (Mon, 13 Sep 2004)
New Revision: 2303

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/libcli/auth&rev=2303&nolog=1

Log:
allow setting of many ntlmssp options from smb.conf or the command
line. This makes testing much easier.


Modified:
   branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c	2004-09-13 01:27:37 UTC (rev 2302)
+++ branches/SAMBA_4_0/source/libcli/auth/ntlmssp.c	2004-09-13 02:35:55 UTC (rev 2303)
@@ -938,11 +938,20 @@
 	(*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 @@
 	(*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;
 }
 



More information about the samba-cvs mailing list