diff options
author | Günther Deschner <gd@samba.org> | 2008-02-06 16:19:20 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-07 14:25:18 +0100 |
commit | 1c788bc36561842d08c3f62b5d3145dbe74db620 (patch) | |
tree | 4614b83777642886d54f4dc96ac6d45d19051f2d /source3/utils | |
parent | cce7e93d842833e7f44254d80de59cc35e8f2af7 (diff) | |
download | samba-1c788bc36561842d08c3f62b5d3145dbe74db620.tar.gz samba-1c788bc36561842d08c3f62b5d3145dbe74db620.tar.bz2 samba-1c788bc36561842d08c3f62b5d3145dbe74db620.zip |
Use rpccli_samr_GetGroupsForUser() all over the place.
Guenther
(This used to be commit d1c669920e88e7fecd13101c4ddfe45354c5ecdb)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 8530767d38..612ae1cb2e 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1164,7 +1164,7 @@ static NTSTATUS rpc_user_info_internals(const DOM_SID *domain_sid, uint32 flags = 0x000003e8; /* Unknown */ int i; char **names; - DOM_GID *user_gids; + struct samr_RidWithAttributeArray *rid_array = NULL; if (argc < 1) { d_printf("User must be specified\n"); @@ -1203,11 +1203,14 @@ static NTSTATUS rpc_user_info_internals(const DOM_SID *domain_sid, &user_pol); if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_samr_query_usergroups(pipe_hnd, mem_ctx, &user_pol, - &num_rids, &user_gids); + result = rpccli_samr_GetGroupsForUser(pipe_hnd, mem_ctx, + &user_pol, + &rid_array); if (!NT_STATUS_IS_OK(result)) goto done; + num_rids = rid_array->count; + /* Look up rids */ if (num_rids) { @@ -1217,7 +1220,7 @@ static NTSTATUS rpc_user_info_internals(const DOM_SID *domain_sid, } for (i = 0; i < num_rids; i++) - rids[i] = user_gids[i].g_rid; + rids[i] = rid_array->rids[i].rid; result = rpccli_samr_lookup_rids(pipe_hnd, mem_ctx, &domain_pol, num_rids, rids, |