summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-30 02:05:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:23 -0500
commit5a69d0a82a71f0a4009e0c4e2a8c053e4d39c903 (patch)
tree18f02947b6286f24da5867912fa245d6caf81d03 /source3
parent3fb83080723f53a7dbd51cafe291bd0eae9197a5 (diff)
downloadsamba-5a69d0a82a71f0a4009e0c4e2a8c053e4d39c903.tar.gz
samba-5a69d0a82a71f0a4009e0c4e2a8c053e4d39c903.tar.bz2
samba-5a69d0a82a71f0a4009e0c4e2a8c053e4d39c903.zip
r6122: Added "hack" fix for broken SMB_INFO_VOLUME level - used by OS/2
I believe. Reported as fixed by Marcel Müller <mueller@maazl.de>. Jeremy. (This used to be commit 14eab937a54dd9f02f289d7e2f47c78c834714a3)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ad125788a1..163cfbd5e3 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2097,7 +2097,13 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_dev, (unsi
* 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",