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

tridge at samba.org tridge at samba.org
Wed Sep 27 23:24:37 GMT 2006


Author: tridge
Date: 2006-09-27 23:24:36 +0000 (Wed, 27 Sep 2006)
New Revision: 18965

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

Log:

fixed the bug with RPC-NETLOGON and solaris sparc machines. This bug
took a _LONG_ time to find.

The problem was that when encoding/decoding password buffers we use
the pull/push string functions, which by default align unicode
strings. But on solaris sparc the buffer is not aligned always (its a
stack variable, an array of uint8_t). That perfectly OK in C, so we
just tell the pull/push functions not to auto-align.

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


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c	2006-09-27 21:37:43 UTC (rev 18964)
+++ branches/SAMBA_4_0/source/libcli/auth/smbencrypt.c	2006-09-27 23:24:36 UTC (rev 18965)
@@ -460,6 +460,9 @@
 	uint8_t new_pw[512];
 	size_t new_pw_len;
 
+	/* the incoming buffer can be any alignment. */
+	string_flags |= STR_NOALIGN;
+
 	new_pw_len = push_string(new_pw,
 				 password, 
 				 sizeof(new_pw), string_flags);
@@ -489,6 +492,9 @@
 {
 	int byte_len=0;
 
+	/* the incoming buffer can be any alignment. */
+	string_flags |= STR_NOALIGN;
+
 	/*
 	  Warning !!! : This function is called from some rpc call.
 	  The password IN the buffer may be a UNICODE string.



More information about the samba-cvs mailing list