From fbb2be050ded099741345a101ba13e6b12ebc823 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Dec 1997 23:30:43 +0000 Subject: add the null string to SMBsetatr calls --- source/libsmb/clientgen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/libsmb') 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)) { -- cgit