summaryrefslogtreecommitdiff
path: root/source3/libsmb/climessage.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-06-21 05:38:28 +0000
committerAndrew Tridgell <tridge@samba.org>2001-06-21 05:38:28 +0000
commit4ff011d88ef5b79b92d2cea1abe32c93bc03f724 (patch)
tree20b1b8f8bebdb3b4f741f6f2733a23af01b7c467 /source3/libsmb/climessage.c
parentfda0f83d751a1ea6c731fd6a82484a724a1c6e32 (diff)
downloadsamba-4ff011d88ef5b79b92d2cea1abe32c93bc03f724.tar.gz
samba-4ff011d88ef5b79b92d2cea1abe32c93bc03f724.tar.bz2
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/climessage.c')
-rw-r--r--source3/libsmb/climessage.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c
index 87f8175459..d46986bfd6 100644
--- a/source3/libsmb/climessage.c
+++ b/source3/libsmb/climessage.c
@@ -71,7 +71,7 @@ BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
char *p;
memset(cli->outbuf,'\0',smb_size);
- set_message(cli->outbuf,1,len+3,True);
+ set_message(cli->outbuf,1,0,True);
CVAL(cli->outbuf,smb_com) = SMBsendtxt;
SSVAL(cli->outbuf,smb_tid,cli->cnum);
cli_setup_packet(cli);
@@ -79,9 +79,12 @@ BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp)
SSVAL(cli->outbuf,smb_vwv0,grp);
p = smb_buf(cli->outbuf);
- *p = 1;
- SSVAL(p,1,len);
- memcpy(p+3,msg,len);
+ *p++ = 1;
+ SSVAL(p,0,len); p += 2;
+ memcpy(p,msg,len);
+ p += len;
+
+ cli_setup_bcc(cli, p);
cli_send_smb(cli);
if (!cli_receive_smb(cli)) {