diff options
author | Simo Sorce <idra@samba.org> | 2001-07-01 10:39:37 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-07-01 10:39:37 +0000 |
commit | 200110a3b4caeb0d8be87f02476af29165e35ada (patch) | |
tree | 0c357ef8a9b6a0dbddbb8294a9ac06cbdc85ead4 | |
parent | 93c45024cdbbf51322106e2a5961db8c09618833 (diff) | |
download | samba-200110a3b4caeb0d8be87f02476af29165e35ada.tar.gz samba-200110a3b4caeb0d8be87f02476af29165e35ada.tar.xz samba-200110a3b4caeb0d8be87f02476af29165e35ada.zip |
- fix bug in reply_nt- fix bug in reply_nt1
-rw-r--r-- | source/smbd/negprot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/negprot.c b/source/smbd/negprot.c index 2c6575d6437..11400af7101 100644 --- a/source/smbd/negprot.c +++ b/source/smbd/negprot.c @@ -173,11 +173,10 @@ static int reply_nt1(char *outbuf) int secword=0; BOOL doencrypt = SMBENCRYPT(); time_t t = time(NULL); - int data_len; struct cli_state *cli = NULL; char cryptkey[8]; char crypt_len = 0; - char *p; + char *p, *q; if (lp_security() == SEC_SERVER) { cli = server_cryptkey(); @@ -231,13 +230,14 @@ static int reply_nt1(char *outbuf) SIVAL(outbuf,smb_vwv9+1,capabilities); /* capabilities */ put_long_date(outbuf+smb_vwv11+1,t); SSVALS(outbuf,smb_vwv15+1,TimeDiff(t)/60); - SSVAL(outbuf,smb_vwv17,data_len); /* length of challenge+domain strings */ - p = smb_buf(outbuf); + p = q = smb_buf(outbuf); if (doencrypt) memcpy(p, cryptkey, 8); p += 8; p += srvstr_push(outbuf, p, global_myworkgroup, -1, STR_UNICODE|STR_CONVERT|STR_TERMINATE|STR_NOALIGN); + + SSVAL(outbuf,smb_vwv17, p - q); /* length of challenge+domain strings */ set_message_end(outbuf, p); return (smb_len(outbuf)+4); |