summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-04-21 08:01:51 +0200
committerGünther Deschner <gd@samba.org>2008-04-21 23:36:05 +0200
commitb78453326bf41cf3af239a5415dfef80a842d555 (patch)
tree6d788f05ceef5a1efc0ed9dd67e66366ebd6291f /source3/rpc_client
parentba0bf87d967a9544b9c97525994a43ad5b6f1f60 (diff)
downloadsamba-b78453326bf41cf3af239a5415dfef80a842d555.tar.gz
samba-b78453326bf41cf3af239a5415dfef80a842d555.tar.bz2
samba-b78453326bf41cf3af239a5415dfef80a842d555.zip
Remove the "pwd" struct from rpc_pipe_client
The only user of this was decrypt_trustdom_secret, and this only needs the NT hash anyway. (This used to be commit 3d8c2a47e677a4c4aacf4abf148b1bd8163c3351)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index d4ce45446b..828307cace 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2139,6 +2139,18 @@ bool rpccli_is_pipe_idx(struct rpc_pipe_client *cli, int pipe_idx)
return (cli->abstract_syntax == pipe_names[pipe_idx].abstr_syntax);
}
+bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16])
+{
+ if (!((cli->auth.auth_type == PIPE_AUTH_TYPE_NTLMSSP)
+ || (cli->auth.auth_type == PIPE_AUTH_TYPE_SPNEGO_NTLMSSP))) {
+ E_md4hash(cli->cli->pwd.password, nt_hash);
+ return true;
+ }
+
+ memcpy(nt_hash, cli->auth.a_u.ntlmssp_state->nt_hash, 16);
+ return true;
+}
+
struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p)
{
return p->cli;
@@ -2337,8 +2349,6 @@ static struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_internal(struct cli_sta
goto err;
}
- pwd_set_cleartext(&result->pwd, password);
-
*perr = ntlmssp_client_start(&ntlmssp_state);
if (!NT_STATUS_IS_OK(*perr)) {
goto err;