rpcclient ntlogin test
authorLuke Leighton <lkcl@samba.org>
Fri, 16 Oct 1998 00:59:22 +0000 (00:59 +0000)
committerLuke Leighton <lkcl@samba.org>
Fri, 16 Oct 1998 00:59:22 +0000 (00:59 +0000)
(This used to be commit f69cf05ff56dffb313304964d5bf5e5aee2f40a7)

source3/rpc_parse/parse_net.c
source3/rpc_server/srv_netlog.c

index 2fc0d1244638ab788503753e03720243a5f24434..d99c4baac6e40edf300e496c25ac99a024721bba 100644 (file)
@@ -580,11 +580,11 @@ void make_id_info1(NET_ID_INFO_1 *id, char *domain_name,
 #endif
 
                memset(key, 0, 16);
-               memcpy(key, sess_key, 16);
+               memcpy(key, sess_key, 8);
 
-               memcpy(lm_cypher, lm_owf, 16);
+               memcpy(lm_owf, lm_cypher, 16);
                SamOEMhash(lm_owf, key, False);
-               memcpy(lm_cypher, lm_owf, 16);
+               memcpy(nt_owf, nt_cypher, 16);
                SamOEMhash(nt_owf, key, False);
 
 #ifdef DEBUG_PASSWORD
index 17a534b6f02c88985e9e47e864f8b0c8ba5ce376..79a659faf8d1432e24941906ffa45892ae02184a 100644 (file)
@@ -506,6 +506,17 @@ static uint32 net_login_interactive(NET_ID_INFO_1 *id1,
        memcpy(lm_pwd, id1->lm_owf.data, 16);
        memcpy(nt_pwd, id1->nt_owf.data, 16);
 
+#ifdef DEBUG_PASSWORD
+       DEBUG(100,("key:"));
+       dump_data(100, key, 16);
+
+       DEBUG(100,("lm owf password:"));
+       dump_data(100, lm_pwd, 16);
+
+       DEBUG(100,("nt owf password:"));
+       dump_data(100, nt_pwd, 16);
+#endif
+
        SamOEMhash((uchar *)lm_pwd, key, False);
        SamOEMhash((uchar *)nt_pwd, key, False);
 
@@ -518,7 +529,7 @@ static uint32 net_login_interactive(NET_ID_INFO_1 *id1,
 #endif
 
        if (memcmp(smb_pass->smb_passwd   , lm_pwd, 16) != 0 &&
-               memcmp(smb_pass->smb_nt_passwd, nt_pwd, 16) != 0)
+           memcmp(smb_pass->smb_nt_passwd, nt_pwd, 16) != 0)
        {
                status = 0xC0000000 | NT_STATUS_WRONG_PASSWORD;
        }