summaryrefslogtreecommitdiff
path: root/source3/smbd/blocking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-08-14 16:53:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:38 -0500
commit6fd4813ece5e03c92334acfa7e168cd7d0248919 (patch)
tree8abb94bdb18825437feb20e67098cd6afe538415 /source3/smbd/blocking.c
parentb757699e8b14fb0d5780e2513ffe64c087f5871d (diff)
downloadsamba-6fd4813ece5e03c92334acfa7e168cd7d0248919.tar.gz
samba-6fd4813ece5e03c92334acfa7e168cd7d0248919.tar.bz2
samba-6fd4813ece5e03c92334acfa7e168cd7d0248919.zip
r17541: When returning a trans2 request, if the "max data
bytes returned" is less than the amount we want to send, return what we can and set STATUS_BUFFER_OVERFLOW (doserror ERRDOS,ERRbufferoverflow). Required by OS/2 to handle EA's that are too large. It's hard to test this in Samba4 smbtorture as the max data bytes returned is hard coded at 0xffff (as it is in the Samba3 client libraries also). I used a custom version of Samba4 smbtorture to test this out. Might add a "max data bytes" param to make this testable in the build farm. Confirmed by "Guenter Kukkukk (sambaos2)" <sambaos2@kukkukk.com> and Andreas Taegener <atsamba11@eideltown.de> that this fixes the issue. Jeremy. (This used to be commit ff2f1202b76991a404dae8df17c36f8135c8dc51)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r--source3/smbd/blocking.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 0304a6559f..2f89759ffd 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -458,7 +458,8 @@ static BOOL process_trans2(blocking_lock_record *blr)
construct_reply_common(inbuf, outbuf);
SCVAL(outbuf,smb_com,SMBtrans2);
SSVAL(params,0,0);
- send_trans2_replies(outbuf, max_send, params, 2, NULL, 0);
+ /* Fake up max_data_bytes here - we know it fits. */
+ send_trans2_replies(outbuf, max_send, params, 2, NULL, 0, 0xffff);
return True;
}