diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/credentials.c | 2 | ||||
-rw-r--r-- | source3/smbd/pipes.c | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c index 3af182c5db..3355ab1704 100644 --- a/source3/libsmb/credentials.c +++ b/source3/libsmb/credentials.c @@ -130,7 +130,7 @@ int cred_assert(DOM_CHAL *cred, char *session_key, DOM_CHAL *stored_cred, DEBUG(4,("cred_assert\n")); DEBUG(5,(" challenge: ")); - dump_data(5, cred->data, 16); + dump_data(5, cred->data, 8); DEBUG(5,(" calculated: ")); dump_data(5, cred2.data, 8); diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index 59592a04ae..74bde7493d 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -1181,13 +1181,9 @@ static BOOL update_dcinfo(int cnum, uint16 vuid, DEBUG(4,("pass %s %s\n", mach_acct, foo)); } - /* from client / server challenges and md4 password, generate sess key */ - cred_session_key(&(dc->clnt_chal), &(dc->srv_chal), - dc->md4pw, dc->sess_key); - - /* copy the client credentials for later use */ - memcpy(dc->srv_chal.data, clnt_chal->data, sizeof(clnt_chal->data)); - memcpy(dc->srv_cred.data, clnt_chal->data, sizeof(clnt_chal->data)); + /* copy the client credentials */ + memcpy(dc->clnt_chal.data, clnt_chal->data, sizeof(clnt_chal->data)); + memcpy(dc->clnt_cred.data, clnt_chal->data, sizeof(clnt_chal->data)); /* create a server challenge for the client */ /* PAXX: set these to random values. */ @@ -1197,6 +1193,10 @@ static BOOL update_dcinfo(int cnum, uint16 vuid, dc->srv_chal.data[i] = 0xA5; } + /* from client / server challenges and md4 password, generate sess key */ + cred_session_key(&(dc->clnt_chal), &(dc->srv_chal), + dc->md4pw, dc->sess_key); + DEBUG(6,("update_dcinfo: %d\n", __LINE__)); return True; @@ -1218,9 +1218,10 @@ static void api_lsa_req_chal( int cnum, uint16 vuid, strcat(mach_acct, "$"); - update_dcinfo(cnum, vuid, &(vuser->dc), &(q_r.clnt_chal), mach_acct); + DEBUG(6,("q_r.clnt_chal.data(%d) :", sizeof(q_r.clnt_chal.data))); + dump_data(6, q_r.clnt_chal.data, 8); - DEBUG(6,("api_lsa_req_chal: %d\n", __LINE__)); + update_dcinfo(cnum, vuid, &(vuser->dc), &(q_r.clnt_chal), mach_acct); /* construct reply. return status is always 0x0 */ *rdata_len = lsa_reply_req_chal(&q_r, *rdata + 0x18, *rdata, |