summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-07-01 10:39:37 +0000
committerSimo Sorce <idra@samba.org>2001-07-01 10:39:37 +0000
commit247acd5521f28a4f932105c9c76699c62f3f95f9 (patch)
treef41bbad07acbb416a2c2b46426109166264247b7 /source3/smbd
parent9178d7591b64c1e3ac92b19506811c5944476071 (diff)
downloadsamba-247acd5521f28a4f932105c9c76699c62f3f95f9.tar.gz
samba-247acd5521f28a4f932105c9c76699c62f3f95f9.tar.bz2
samba-247acd5521f28a4f932105c9c76699c62f3f95f9.zip
- fix bug in reply_nt- fix bug in reply_nt1
(This used to be commit 200110a3b4caeb0d8be87f02476af29165e35ada)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c8
1 files changed, 4 insertions, 4 deletions
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);