1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

- fix bug in reply_nt- fix bug in reply_nt1

(This used to be commit 200110a3b4caeb0d8be87f02476af29165e35ada)
This commit is contained in:
Simo Sorce 2001-07-01 10:39:37 +00:00
parent 9178d7591b
commit 247acd5521

View File

@ -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);