summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_rpc.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-15 13:58:47 +0000
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-01-15 13:58:47 +0000
commit9788383a6c08189564cd18a824aab4ccdbe57a21 (patch)
treee93ab7b1007d79e951f69a1495ac7e474536eb25 /source3/utils/net_rpc.c
parent011e89c85868ec8f16e475a560a0e5bd41995920 (diff)
parent97f61b542c0e6b1f25ed08fa36792fd90a981e0e (diff)
downloadsamba-9788383a6c08189564cd18a824aab4ccdbe57a21.tar.gz
samba-9788383a6c08189564cd18a824aab4ccdbe57a21.tar.xz
samba-9788383a6c08189564cd18a824aab4ccdbe57a21.zip
Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test
(This used to be commit 3a61e663e51fe620225691bc8673bf8800a36f47)
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 155cda64df..2bd867fff3 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5850,24 +5850,30 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
const char *trusted_dom_name)
{
NTSTATUS nt_status;
- LSA_TRUSTED_DOMAIN_INFO *info;
+ union lsa_TrustedDomainInfo info;
char *cleartextpwd = NULL;
DATA_BLOB data;
- nt_status = rpccli_lsa_query_trusted_domain_info_by_sid(pipe_hnd, mem_ctx, pol, 4, &dom_sid, &info);
-
+ nt_status = rpccli_lsa_QueryTrustedDomainInfoBySid(pipe_hnd, mem_ctx,
+ pol,
+ &dom_sid,
+ LSA_TRUSTED_DOMAIN_INFO_PASSWORD,
+ &info);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0,("Could not query trusted domain info. Error was %s\n",
nt_errstr(nt_status)));
goto done;
}
- data = data_blob(NULL, info->password.password.length);
+ data = data_blob(NULL, info.password.password->length);
- memcpy(data.data, info->password.password.data, info->password.password.length);
- data.length = info->password.password.length;
-
- cleartextpwd = decrypt_trustdom_secret(pipe_hnd->cli->pwd.password, &data);
+ memcpy(data.data,
+ info.password.password->data,
+ info.password.password->length);
+ data.length = info.password.password->length;
+
+ cleartextpwd = decrypt_trustdom_secret(pipe_hnd->cli->pwd.password,
+ &data);
if (cleartextpwd == NULL) {
DEBUG(0,("retrieved NULL password\n"));