summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-08 02:12:30 +0100
committerGünther Deschner <gd@samba.org>2008-02-08 10:26:20 +0100
commit7520439dcac47bc60a8d5526f4acb834f177fec9 (patch)
tree13330aa40fed0e9f1ae9a50c3094ac366a1bd032 /source3/rpcclient
parentb13277ed4e59c64f1c3c15109c85a8967c6260fe (diff)
downloadsamba-7520439dcac47bc60a8d5526f4acb834f177fec9.tar.gz
samba-7520439dcac47bc60a8d5526f4acb834f177fec9.tar.bz2
samba-7520439dcac47bc60a8d5526f4acb834f177fec9.zip
Use rpccli_lsa_QueryInfoPolicy() all over the place.
Guenther (This used to be commit ce22abcea3446e4ad42e8e04654b9855b173c5a1)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 7b499918b0..4a9b4acb7d 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -133,12 +133,10 @@ static void fetch_machine_sid(struct cli_state *cli)
{
POLICY_HND pol;
NTSTATUS result = NT_STATUS_OK;
- uint32 info_class = 5;
- const char *domain_name = NULL;
static bool got_domain_sid;
TALLOC_CTX *mem_ctx;
- DOM_SID *dom_sid = NULL;
struct rpc_pipe_client *lsapipe = NULL;
+ union lsa_PolicyInformation *info = NULL;
if (got_domain_sid) return;
@@ -159,14 +157,16 @@ static void fetch_machine_sid(struct cli_state *cli)
goto error;
}
- result = rpccli_lsa_query_info_policy(lsapipe, mem_ctx, &pol, info_class,
- &domain_name, &dom_sid);
+ result = rpccli_lsa_QueryInfoPolicy(lsapipe, mem_ctx,
+ &pol,
+ LSA_POLICY_INFO_ACCOUNT_DOMAIN,
+ &info);
if (!NT_STATUS_IS_OK(result)) {
goto error;
}
got_domain_sid = True;
- sid_copy( &domain_sid, dom_sid );
+ sid_copy(&domain_sid, info->account_domain.sid);
rpccli_lsa_Close(lsapipe, mem_ctx, &pol);
cli_rpc_pipe_close(lsapipe);