svn commit: samba r6121 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Wed Mar 30 02:05:06 GMT 2005


Author: jra
Date: 2005-03-30 02:05:05 +0000 (Wed, 30 Mar 2005)
New Revision: 6121

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

Log:
Added "hack" fix for broken SMB_INFO_VOLUME level - used by OS/2
I believe. Reported as fixed by Marcel M?\195?\188ller <mueller at maazl.de>.
Jeremy.

Modified:
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/smbd/trans2.c
===================================================================
--- trunk/source/smbd/trans2.c	2005-03-30 00:47:57 UTC (rev 6120)
+++ trunk/source/smbd/trans2.c	2005-03-30 02:05:05 UTC (rev 6121)
@@ -2097,7 +2097,13 @@
 			 * the called hostname and the service name.
 			 */
 			SIVAL(pdata,0,str_checksum(lp_servicename(snum)) ^ (str_checksum(get_local_machine_name())<<16) );
-			len = srvstr_push(outbuf, pdata+l2_vol_szVolLabel, vname, -1, STR_NOALIGN);
+			/*
+			 * Win2k3 and previous mess this up by sending a name length
+			 * one byte short. I believe only older clients (OS/2 Win9x) use
+			 * this call so try fixing this by adding a terminating null to
+			 * the pushed string. The change here was adding the STR_TERMINATE. JRA.
+			 */
+			len = srvstr_push(outbuf, pdata+l2_vol_szVolLabel, vname, -1, STR_NOALIGN|STR_TERMINATE);
 			SCVAL(pdata,l2_vol_cch,len);
 			data_len = l2_vol_szVolLabel + len;
 			DEBUG(5,("call_trans2qfsinfo : time = %x, namelen = %d, name = %s\n",



More information about the samba-cvs mailing list