svn commit: samba r5290 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Wed Feb 9 23:46:16 GMT 2005


Author: jra
Date: 2005-02-09 23:46:14 +0000 (Wed, 09 Feb 2005)
New Revision: 5290

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

Log:
Fix for bug #2323 - plaintext problem with WinXP.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/sesssetup.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/sesssetup.c	2005-02-09 23:45:57 UTC (rev 5289)
+++ branches/SAMBA_3_0/source/smbd/sesssetup.c	2005-02-09 23:46:14 UTC (rev 5290)
@@ -755,10 +755,18 @@
 			pstring pass;
 			BOOL unic=SVAL(inbuf, smb_flg2) & FLAGS2_UNICODE_STRINGS;
 
+#if 0
+			/* This was the previous fix. Not sure if it's still valid. JRA. */
 			if ((ra_type == RA_WINNT) && (passlen2 == 0) && unic && passlen1) {
 				/* NT4.0 stuffs up plaintext unicode password lengths... */
 				srvstr_pull(inbuf, pass, smb_buf(inbuf) + 1,
 					sizeof(pass), passlen1, STR_TERMINATE);
+#endif
+
+			if (unic && (passlen2 == 0) && passlen1) {
+				/* Only a ascii plaintext password was sent. */
+				srvstr_pull(inbuf, pass, smb_buf(inbuf), sizeof(pass),
+					passlen1, STR_TERMINATE|STR_ASCII);
 			} else {
 				srvstr_pull(inbuf, pass, smb_buf(inbuf), 
 					sizeof(pass),  unic ? passlen2 : passlen1, 



More information about the samba-cvs mailing list