summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-09-16 22:46:45 +0000
committerLuke Leighton <lkcl@samba.org>1999-09-16 22:46:45 +0000
commit701f9ed2c97ad50a4258e278a3674b8f5a747d8e (patch)
tree3a2b15703ad998555b6403fa22c07ea803be894c /source3/smbd
parentb9b4c1d56349824616f2fcaff57cedbc52168059 (diff)
downloadsamba-701f9ed2c97ad50a4258e278a3674b8f5a747d8e.tar.gz
samba-701f9ed2c97ad50a4258e278a3674b8f5a747d8e.tar.bz2
samba-701f9ed2c97ad50a4258e278a3674b8f5a747d8e.zip
reading in smb server domain name from SMBnegprot response
(This used to be commit 25025f450531c66c0fd9f7eed886cb288d76d025)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 51ec963b8c..0b48b0e2b2 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -218,12 +218,13 @@ static int reply_nt1(char *outbuf)
if (doencrypt) secword |= 2;
/* decide where (if) to put the encryption challenge, and
- follow it with the OEM'd domain name
+ follow it with the OEM'd domain name in Unicode.
*/
- data_len = crypt_len + strlen(global_myworkgroup) + 1;
+ data_len = crypt_len + (strlen(global_myworkgroup)+1)*2;
set_message(outbuf,17,data_len,True);
- pstrcpy(smb_buf(outbuf)+crypt_len, global_myworkgroup);
+ ascii_to_unibuf(smb_buf(outbuf)+crypt_len, global_myworkgroup,
+ (strlen(global_myworkgroup)+1)*2);
CVAL(outbuf,smb_vwv1) = secword;
SSVALS(outbuf,smb_vwv16+1,crypt_len);