summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-09-20 22:45:52 +0200
committerVolker Lendecke <vlendec@samba.org>2011-09-21 00:51:08 +0200
commit9881712a09b2579047dcca6c22f9e919029455d4 (patch)
treeb6690816efc36f14be0ce55df840ea5339e2b728 /source3
parent37b9753096f20087bf3bf9f8454b99302eebdfd2 (diff)
downloadsamba-9881712a09b2579047dcca6c22f9e919029455d4.tar.gz
samba-9881712a09b2579047dcca6c22f9e919029455d4.tar.bz2
samba-9881712a09b2579047dcca6c22f9e919029455d4.zip
s3: Further fix for bug 8338
OS/X can not deal with a 10-vwv read on normal files. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Sep 21 00:51:08 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clireadwrite.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 1ee2196b76..e8c901755d 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -155,10 +155,17 @@ struct tevent_req *cli_read_andx_create(TALLOC_CTX *mem_ctx,
SSVAL(state->vwv + 8, 0, 0);
SSVAL(state->vwv + 9, 0, 0);
- if ((uint64_t)offset >> 32) {
+ if (cli_state_capabilities(cli) & CAP_LARGE_FILES) {
SIVAL(state->vwv + 10, 0,
(((uint64_t)offset)>>32) & 0xffffffff);
- wct += 2;
+ wct = 12;
+ } else {
+ if ((((uint64_t)offset) & 0xffffffff00000000LL) != 0) {
+ DEBUG(10, ("cli_read_andx_send got large offset where "
+ "the server does not support it\n"));
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
}
subreq = cli_smb_req_create(state, ev, cli, SMBreadX, 0, wct,