summaryrefslogtreecommitdiffstats
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
commitf97a49c39e467b1efb93fc3b585af92c3e52f606 (patch)
treeadbe0b7f6a794881c42496ed07c43f12bd32fcba
parenta53d7c11649e61b74b23bd6127283f2c7a3d63b0 (diff)
downloadsamba-f97a49c39e467b1efb93fc3b585af92c3e52f606.tar.gz
samba-f97a49c39e467b1efb93fc3b585af92c3e52f606.tar.xz
samba-f97a49c39e467b1efb93fc3b585af92c3e52f606.zip
add the null string to SMBsetatr calls
(This used to be commit fbb2be050ded099741345a101ba13e6b12ebc823)
-rw-r--r--source3/libsmb/clientgen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 69e940845c..d827eadfe1 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/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)) {