summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-08 01:57:55 +0100
committerGünther Deschner <gd@samba.org>2008-02-08 10:16:00 +0100
commit3783e6af8a8cd4b3cc1d43507704f17e6bb1a9a5 (patch)
tree1c5dc6771dea234def7804abba992b13af0c22a4
parentec9281fcacf5eaad2271d6956fe55308ec378a16 (diff)
downloadsamba-3783e6af8a8cd4b3cc1d43507704f17e6bb1a9a5.tar.gz
samba-3783e6af8a8cd4b3cc1d43507704f17e6bb1a9a5.tar.bz2
samba-3783e6af8a8cd4b3cc1d43507704f17e6bb1a9a5.zip
Use rpccli_lsa_QueryInfoPolicy2 in libnet join.
Guenther (This used to be commit ddc2fc16bf18fe3ab8a0fc0021826253d5f4ed32)
-rw-r--r--source3/libnet/libnet_join.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index f855a57f32..2f8d3e3085 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -610,6 +610,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
uchar md5buffer[16];
DATA_BLOB digested_session_key;
uchar md4_trust_password[16];
+ union lsa_PolicyInformation *info = NULL;
if (!r->in.machine_password) {
r->in.machine_password = talloc_strdup(mem_ctx, generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH));
@@ -641,16 +642,15 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
goto done;
}
- status = rpccli_lsa_query_info_policy2(pipe_hnd, mem_ctx, &lsa_pol,
- 12,
- &r->out.netbios_domain_name,
- &r->out.dns_domain_name,
- NULL,
- NULL,
- &r->out.domain_sid);
-
+ status = rpccli_lsa_QueryInfoPolicy2(pipe_hnd, mem_ctx,
+ &lsa_pol,
+ LSA_POLICY_INFO_DNS,
+ &info);
if (NT_STATUS_IS_OK(status)) {
r->out.domain_is_ad = true;
+ r->out.netbios_domain_name = info->dns.name.string;
+ r->out.dns_domain_name = info->dns.dns_domain.string;
+ r->out.domain_sid = info->dns.sid;
}
if (!NT_STATUS_IS_OK(status)) {