summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-12-18 10:31:12 +0100
committerGünther Deschner <gd@samba.org>2007-12-21 15:29:10 +0100
commitf3476faa36adeacea4301aff823ec021588cca2e (patch)
tree43d60462896106b4817a7dc8ef8fb6490cada054 /source3/libnet
parentb6347c06935fc769b4bd6cdcbca63c633ba12614 (diff)
downloadsamba-f3476faa36adeacea4301aff823ec021588cca2e.tar.gz
samba-f3476faa36adeacea4301aff823ec021588cca2e.tar.bz2
samba-f3476faa36adeacea4301aff823ec021588cca2e.zip
In libnet join code, try lsa query with level 12 first.
Guenther (This used to be commit f0e8d744c92d2602722e04be6266196941362d63)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c18
1 files 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);