svn commit: samba r23200 - in branches/SAMBA_3_0_26/source: libads nmbd

jerry at samba.org jerry at samba.org
Tue May 29 14:26:27 GMT 2007


Author: jerry
Date: 2007-05-29 14:26:27 +0000 (Tue, 29 May 2007)
New Revision: 23200

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23200

Log:
More merge's:

* A little const
* Metze's fix for GSS-SPNEGO against Win2k3


Modified:
   branches/SAMBA_3_0_26/source/libads/sasl.c
   branches/SAMBA_3_0_26/source/nmbd/nmbd_lmhosts.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/libads/sasl.c
===================================================================
--- branches/SAMBA_3_0_26/source/libads/sasl.c	2007-05-29 14:19:53 UTC (rev 23199)
+++ branches/SAMBA_3_0_26/source/libads/sasl.c	2007-05-29 14:26:27 UTC (rev 23200)
@@ -441,7 +441,8 @@
 
 	gss_release_buffer(&minor_status, &output_token);
 
-	output_token.value = SMB_MALLOC(strlen(ads->config.bind_path) + 8);
+	output_token.length = 4;
+	output_token.value = SMB_MALLOC(output_token.length);
 	p = (uint8 *)output_token.value;
 
 	*p++ = 1; /* no sign & seal selection */
@@ -449,11 +450,15 @@
 	*p++ = max_msg_size>>16;
 	*p++ = max_msg_size>>8;
 	*p++ = max_msg_size;
-	snprintf((char *)p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path);
-	p += strlen((const char *)p);
+	/*
+	 * we used to add sprintf("dn:%s", ads->config.bind_path) here.
+	 * but using ads->config.bind_path is the wrong! It should be
+	 * the DN of the user object!
+	 *
+	 * w2k3 gives an error when we send an incorrect DN, but sending nothing
+	 * is ok and matches the information flow used in GSS-SPNEGO.
+	 */
 
-	output_token.length = PTR_DIFF(p, output_token.value);
-
 	gss_rc = gss_wrap(&minor_status, context_handle,0,GSS_C_QOP_DEFAULT,
 			  &output_token, (int *)&conf_state,
 			  &input_token);

Modified: branches/SAMBA_3_0_26/source/nmbd/nmbd_lmhosts.c
===================================================================
--- branches/SAMBA_3_0_26/source/nmbd/nmbd_lmhosts.c	2007-05-29 14:19:53 UTC (rev 23199)
+++ branches/SAMBA_3_0_26/source/nmbd/nmbd_lmhosts.c	2007-05-29 14:26:27 UTC (rev 23200)
@@ -29,7 +29,7 @@
 Load a lmhosts file.
 ****************************************************************************/
 
-void load_lmhosts_file(char *fname)
+void load_lmhosts_file(const char *fname)
 {  
 	pstring name;
 	int name_type;



More information about the samba-cvs mailing list