From 247acd5521f28a4f932105c9c76699c62f3f95f9 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 1 Jul 2001 10:39:37 +0000 Subject: - fix bug in reply_nt- fix bug in reply_nt1 (This used to be commit 200110a3b4caeb0d8be87f02476af29165e35ada) --- source3/smbd/negprot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd/negprot.c') diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 2c6575d643..11400af710 100644 --- a/source3/smbd/negprot.c +++ b/source3/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); -- cgit