debugging... no idea what i'm doing.
authorLuke Leighton <lkcl@samba.org>
Mon, 13 Oct 1997 14:19:17 +0000 (14:19 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 13 Oct 1997 14:19:17 +0000 (14:19 +0000)
(This used to be commit d7a9a02e0a9e1e791810c24bcfcbd39a6bd7dac5)

source3/libsmb/credentials.c
source3/smbd/pipes.c

index 3af182c5db8c7fdb995817cfc9905aad79145560..3355ab170407fd53f9186271da89cd98e0b7698e 100644 (file)
@@ -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);
index 59592a04ae3d264bb77c7798264f80411018da17..74bde7493d62659007ee48b0ca8ab6205ddff74e 100644 (file)
@@ -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,