summaryrefslogtreecommitdiff
path: root/source3/utils
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/utils
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/utils')
-rw-r--r--source3/utils/net_rpc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 5845c14314..24965755fb 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5929,6 +5929,7 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
NTSTATUS nt_status;
union lsa_TrustedDomainInfo *info = NULL;
char *cleartextpwd = NULL;
+ uint8_t nt_hash[16];
DATA_BLOB data;
nt_status = rpccli_lsa_QueryTrustedDomainInfoBySid(pipe_hnd, mem_ctx,
@@ -5945,8 +5946,12 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
data = data_blob(info->password.password->data,
info->password.password->length);
- cleartextpwd = decrypt_trustdom_secret(
- rpc_pipe_np_smb_conn(pipe_hnd)->pwd.password, &data);
+ if (!rpccli_get_pwd_hash(pipe_hnd, nt_hash)) {
+ DEBUG(0, ("Could not retrieve password hash\n"));
+ goto done;
+ }
+
+ cleartextpwd = decrypt_trustdom_secret(nt_hash, &data);
if (cleartextpwd == NULL) {
DEBUG(0,("retrieved NULL password\n"));