summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-21 17:27:20 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-21 17:27:20 +0000
commit680dcc934182544aa49a4a426f2263c1aaedd4aa (patch)
tree33a109520bfddc4c180499c707d2f546a6bb44ba /source3/rpc_client
parent4081147c31919a973ce1859394d0f5a49a0c2f39 (diff)
downloadsamba-680dcc934182544aa49a4a426f2263c1aaedd4aa.tar.gz
samba-680dcc934182544aa49a4a426f2263c1aaedd4aa.tar.bz2
samba-680dcc934182544aa49a4a426f2263c1aaedd4aa.zip
hmmm... have to add client-side support in domain_client_validate() to
_use_ user session key. (This used to be commit be6a6b13939798a9c7242b38864f0ce842391a74)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_login.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_login.c b/source3/rpc_client/cli_login.c
index bd34b0d397..45345cf4ac 100644
--- a/source3/rpc_client/cli_login.c
+++ b/source3/rpc_client/cli_login.c
@@ -165,19 +165,39 @@ BOOL cli_nt_login_network(struct cli_state *cli, uint16 fnum, char *domain, char
char nt_chal_resp[24],
NET_ID_INFO_CTR *ctr, NET_USER_INFO_3 *user_info3)
{
- DEBUG(5,("cli_nt_login_network: %d\n", __LINE__));
+ uchar key[16];
+ BOOL ret;
+ DEBUG(5,("cli_nt_login_network: %d\n", __LINE__));
- /* indicate a "network" login */
- ctr->switch_value = NET_LOGON_TYPE;
+ /* indicate a "network" login */
+ ctr->switch_value = NET_LOGON_TYPE;
- /* Create the structure needed for SAM logon. */
- make_id_info2(&ctr->auth.id2, domain, 0,
- luid_low, 0,
- username, cli->clnt_name_slash,
- (uchar *)lm_chal, (uchar *)lm_chal_resp, (uchar *)nt_chal_resp);
+ /* Create the structure needed for SAM logon. */
+ make_id_info2(&ctr->auth.id2, domain, 0,
+ luid_low, 0,
+ username, cli->clnt_name_slash,
+ (uchar *)lm_chal, (uchar *)lm_chal_resp, (uchar *)nt_chal_resp);
- /* Send client sam-logon request - update credentials on success. */
- return cli_net_sam_logon(cli, fnum, ctr, user_info3);
+ /* Send client sam-logon request - update credentials on success. */
+ ret = cli_net_sam_logon(cli, fnum, ctr, user_info3);
+
+#ifdef DEBUG_PASSWORD
+ DEBUG(100,("cli sess key:"));
+ dump_data(100, cli->sess_key, 8);
+ DEBUG(100,("enc user sess key:"));
+ dump_data(100, user_info3->user_sess_key, 16);
+#endif
+
+ memset(key, 0, 16);
+ memcpy(key, (char*)cli->sess_key, 8);
+
+ SamOEMhash(user_info3->user_sess_key, key, False);
+
+#ifdef DEBUG_PASSWORD
+ DEBUG(100,("dec user sess key:"));
+ dump_data(100, user_info3->user_sess_key, 16);
+#endif
+ return ret;
}
/****************************************************************************