diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-06-21 05:38:28 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-06-21 05:38:28 +0000 |
commit | 4ff011d88ef5b79b92d2cea1abe32c93bc03f724 (patch) | |
tree | 20b1b8f8bebdb3b4f741f6f2733a23af01b7c467 /source3/libsmb/clifile.c | |
parent | fda0f83d751a1ea6c731fd6a82484a724a1c6e32 (diff) | |
download | samba-4ff011d88ef5b79b92d2cea1abe32c93bc03f724.tar.gz samba-4ff011d88ef5b79b92d2cea1abe32c93bc03f724.tar.xz samba-4ff011d88ef5b79b92d2cea1abe32c93bc03f724.zip |
Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually does
send unaligned unicode strings sometimes!
Fixed our handling of the workgroup name tacked on the end of the
NT1 negprot response (a unaligned unicode)
fixed a couple of places where we should be using the message_end fns instead
of pre-calculated buffer lengths
(This used to be commit 86613493a9b2e56523153486931d0bf8d39beb7a)
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r-- | source3/libsmb/clifile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 4002a43c1b2..42454b306f4 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -243,7 +243,7 @@ int cli_nt_create_full(struct cli_state *cli, char *fname, uint32 DesiredAccess, p = smb_buf(cli->outbuf); /* this alignment and termination is critical for netapp filers. Don't change */ - p += clistr_align(cli->outbuf, p); + p += clistr_align(cli, p, STR_CONVERT); len = clistr_push(cli, p, fname, -1, STR_CONVERT); p += len; SSVAL(cli->outbuf,smb_ntcreate_NameLength, len); @@ -786,7 +786,7 @@ int cli_ctemp(struct cli_state *cli, char *path, char **tmp_path) memset(cli->outbuf,'\0',smb_size); memset(cli->inbuf,'\0',smb_size); - set_message(cli->outbuf,1,strlen(path)+2,True); + set_message(cli->outbuf,1,0,True); CVAL(cli->outbuf,smb_com) = SMBctemp; SSVAL(cli->outbuf,smb_tid,cli->cnum); @@ -798,6 +798,8 @@ int cli_ctemp(struct cli_state *cli, char *path, char **tmp_path) *p++ = 4; p += clistr_push(cli, p, path, -1, STR_TERMINATE | STR_CONVERT); + cli_setup_bcc(cli, p); + cli_send_smb(cli); if (!cli_receive_smb(cli)) { return -1; |