diff options
author | Günther Deschner <gd@samba.org> | 2011-01-18 12:01:35 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-01 23:29:14 +0100 |
commit | 20edb2d48bc0b7c4d4d44baf491480838d1e38ba (patch) | |
tree | 461e8c94bb9cb41fef8deac76d9f7a4ddf4da8d3 /source3 | |
parent | 2a63433e942a8b75c27291fba6d6c230be020b09 (diff) | |
download | samba-20edb2d48bc0b7c4d4d44baf491480838d1e38ba.tar.gz samba-20edb2d48bc0b7c4d4d44baf491480838d1e38ba.tar.bz2 samba-20edb2d48bc0b7c4d4d44baf491480838d1e38ba.zip |
s3-net: prefer dcerpc_samr_X functions in rpc_list_alias_members.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 21de74a367..c375cd3362 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -2877,7 +2877,7 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c, struct policy_handle *domain_pol, uint32 rid) { - NTSTATUS result; + NTSTATUS result, status; struct rpc_pipe_client *lsa_pipe; struct policy_handle alias_pol, lsa_pol; uint32 num_members; @@ -2887,20 +2887,29 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c, enum lsa_SidType *types; int i; struct lsa_SidArray sid_array; + struct dcerpc_binding_handle *b = pipe_hnd->binding_handle; - result = rpccli_samr_OpenAlias(pipe_hnd, mem_ctx, + status = dcerpc_samr_OpenAlias(b, mem_ctx, domain_pol, MAXIMUM_ALLOWED_ACCESS, rid, - &alias_pol); - - if (!NT_STATUS_IS_OK(result)) + &alias_pol, + &result); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + if (!NT_STATUS_IS_OK(result)) { return result; + } - result = rpccli_samr_GetMembersInAlias(pipe_hnd, mem_ctx, + status = dcerpc_samr_GetMembersInAlias(b, mem_ctx, &alias_pol, - &sid_array); - + &sid_array, + &result); + if (!NT_STATUS_IS_OK(status)) { + d_fprintf(stderr, _("Couldn't list alias members\n")); + return status; + } if (!NT_STATUS_IS_OK(result)) { d_fprintf(stderr, _("Couldn't list alias members\n")); return result; |