From f3476faa36adeacea4301aff823ec021588cca2e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 18 Dec 2007 10:31:12 +0100 Subject: In libnet join code, try lsa query with level 12 first. Guenther (This used to be commit f0e8d744c92d2602722e04be6266196941362d63) --- source3/libnet/libnet_join.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index f787a2d632..18421056da 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -73,14 +73,6 @@ static NTSTATUS do_DomainJoin(TALLOC_CTX *mem_ctx, goto done; } - status = rpccli_lsa_query_info_policy(pipe_hnd, mem_ctx, &lsa_pol, - 5, - &r->out.netbios_domain_name, - &r->out.domain_sid); - if (!NT_STATUS_IS_OK(status)) { - goto done; - } - status = rpccli_lsa_query_info_policy2(pipe_hnd, mem_ctx, &lsa_pol, 12, &r->out.netbios_domain_name, @@ -89,6 +81,16 @@ static NTSTATUS do_DomainJoin(TALLOC_CTX *mem_ctx, NULL, &r->out.domain_sid); + if (!NT_STATUS_IS_OK(status)) { + status = rpccli_lsa_query_info_policy(pipe_hnd, mem_ctx, &lsa_pol, + 5, + &r->out.netbios_domain_name, + &r->out.domain_sid); + if (!NT_STATUS_IS_OK(status)) { + goto done; + } + } + rpccli_lsa_Close(pipe_hnd, mem_ctx, &lsa_pol); cli_rpc_pipe_close(pipe_hnd); -- cgit