summaryrefslogtreecommitdiffstats
path: root/source/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-12-02 23:30:43 +0000
committerAndrew Tridgell <tridge@samba.org>1997-12-02 23:30:43 +0000
commitfbb2be050ded099741345a101ba13e6b12ebc823 (patch)
treee7d823af6ccc80ef7e16c50e1b9c3111fcc7ae4e /source/libsmb
parent2b0f3fd14908411472be032ad09144cb71c55479 (diff)
downloadsamba-fbb2be050ded099741345a101ba13e6b12ebc823.tar.gz
samba-fbb2be050ded099741345a101ba13e6b12ebc823.tar.xz
samba-fbb2be050ded099741345a101ba13e6b12ebc823.zip
add the null string to SMBsetatr calls
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/clientgen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
index 69e940845ce..d827eadfe14 100644
--- a/source/libsmb/clientgen.c
+++ b/source/libsmb/clientgen.c
@@ -1019,7 +1019,7 @@ BOOL cli_setatr(struct cli_state *cli, char *fname, int attr, time_t t)
bzero(cli->outbuf,smb_size);
bzero(cli->inbuf,smb_size);
- set_message(cli->outbuf,8,strlen(fname)+2,True);
+ set_message(cli->outbuf,8,strlen(fname)+4,True);
CVAL(cli->outbuf,smb_com) = SMBsetatr;
SSVAL(cli->outbuf,smb_tid,cli->cnum);
@@ -1031,6 +1031,8 @@ BOOL cli_setatr(struct cli_state *cli, char *fname, int attr, time_t t)
p = smb_buf(cli->outbuf);
*p = 4;
strcpy(p+1, fname);
+ p = skip_string(p,1);
+ *p = 4;
send_smb(cli->fd,cli->outbuf);
if (!receive_smb(cli->fd,cli->inbuf,cli->timeout)) {