summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_join.c
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/utils/net_rpc_join.c
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/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index d678029c46..939a7246f7 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -169,6 +169,7 @@ int net_rpc_join_newstyle(int argc, const char **argv)
struct lsa_String lsa_acct_name;
uint32 acct_flags=0;
uint32_t access_granted = 0;
+ union lsa_PolicyInformation *info = NULL;
/* check what type of join */
if (argc >= 0) {
@@ -218,10 +219,15 @@ int net_rpc_join_newstyle(int argc, const char **argv)
&lsa_pol),
"error opening lsa policy handle");
- CHECK_RPC_ERR(rpccli_lsa_query_info_policy(pipe_hnd, mem_ctx, &lsa_pol,
- 5, &domain, &domain_sid),
+ CHECK_RPC_ERR(rpccli_lsa_QueryInfoPolicy(pipe_hnd, mem_ctx,
+ &lsa_pol,
+ LSA_POLICY_INFO_ACCOUNT_DOMAIN,
+ &info),
"error querying info policy");
+ domain = info->account_domain.name.string;
+ domain_sid = info->account_domain.sid;
+
rpccli_lsa_Close(pipe_hnd, mem_ctx, &lsa_pol);
cli_rpc_pipe_close(pipe_hnd); /* Done with this pipe */