summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2002-12-19 20:23:45 +0000
committerHerb Lewis <herb@samba.org>2002-12-19 20:23:45 +0000
commitc52a34693d8bb007b246a365aa1ca7502156d9d2 (patch)
tree52804c4d45446fac92a7defbce8f206920cda4ce /source3/libsmb
parentc26dd35c76e671bd566c709510aa97deb1bf1192 (diff)
downloadsamba-c52a34693d8bb007b246a365aa1ca7502156d9d2.tar.gz
samba-c52a34693d8bb007b246a365aa1ca7502156d9d2.tar.bz2
samba-c52a34693d8bb007b246a365aa1ca7502156d9d2.zip
merge from 2.2 fix for smbclient large files
(This used to be commit 723c4caf64c56b78052c52fec78c7143ec19e944)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clireadwrite.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 38e8aac42a..7780c93cc4 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -29,10 +29,15 @@ Issue a single SMBread and don't wait for a reply.
static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
size_t size, int i)
{
+ BOOL bigoffset = False;
+
memset(cli->outbuf,'\0',smb_size);
memset(cli->inbuf,'\0',smb_size);
- set_message(cli->outbuf,10,0,True);
+ if ((SMB_BIG_UINT)offset >> 32)
+ bigoffset = True;
+
+ set_message(cli->outbuf,bigoffset ? 12 : 10,0,True);
SCVAL(cli->outbuf,smb_com,SMBreadX);
SSVAL(cli->outbuf,smb_tid,cli->cnum);
@@ -45,6 +50,9 @@ static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset,
SSVAL(cli->outbuf,smb_vwv6,size);
SSVAL(cli->outbuf,smb_mid,cli->mid + i);
+ if (bigoffset)
+ SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0xffffffff);
+
return cli_send_smb(cli);
}