Use rpccli_lsa_QueryInfoPolicy() in libnet_join.
authorGünther Deschner <gd@samba.org>
Fri, 8 Feb 2008 09:21:25 +0000 (10:21 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 8 Feb 2008 09:26:51 +0000 (10:26 +0100)
Guenther
(This used to be commit 28ef55cbf1662dfe6b64a837ade830f5c864b4b9)

source3/libnet/libnet_join.c

index 2f8d3e3085f3b2c628156287ea0a2de0e0f39ed3..07d4960ffd12f585dcd4ddabfad3ab43ce0e2745 100644 (file)
@@ -654,13 +654,16 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
        }
 
        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);
+               status = rpccli_lsa_QueryInfoPolicy(pipe_hnd, mem_ctx,
+                                                   &lsa_pol,
+                                                   LSA_POLICY_INFO_ACCOUNT_DOMAIN,
+                                                   &info);
                if (!NT_STATUS_IS_OK(status)) {
                        goto done;
                }
+
+               r->out.netbios_domain_name = info->account_domain.name.string;
+               r->out.domain_sid = info->account_domain.sid;
        }
 
        rpccli_lsa_Close(pipe_hnd, mem_ctx, &lsa_pol);