diff options
Diffstat (limited to 'source/utils/net_rpc_join.c')
-rw-r--r-- | source/utils/net_rpc_join.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c index d678029c466..939a7246f78 100644 --- a/source/utils/net_rpc_join.c +++ b/source/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 */ |