summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-05 01:18:56 +0100
committerGünther Deschner <gd@samba.org>2008-02-05 10:05:53 +0100
commit2e73c54fe37d7f721e72b9ebc4d59ee44025088e (patch)
tree0664ab41f6593b4a70e36ec3c7db796dcc830478 /source3/rpcclient
parent5bec586b424d2325bd76683a821629b5635c69f1 (diff)
downloadsamba-2e73c54fe37d7f721e72b9ebc4d59ee44025088e.tar.gz
samba-2e73c54fe37d7f721e72b9ebc4d59ee44025088e.tar.bz2
samba-2e73c54fe37d7f721e72b9ebc4d59ee44025088e.zip
Use rpccli_samr_GetMembersInAlias() in net and rpcclient.
Guenther (This used to be commit 3f48f9e671698235a4152102cf73a694b94542e0)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_samr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index dbc20089ea..5895379ba7 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1100,9 +1100,9 @@ static NTSTATUS cmd_samr_query_aliasmem(struct rpc_pipe_client *cli,
{
POLICY_HND connect_pol, domain_pol, alias_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- uint32 alias_rid, num_members, i;
+ uint32 alias_rid, i;
uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
- DOM_SID *alias_sids;
+ struct lsa_SidArray sid_array;
if ((argc < 3) || (argc > 4)) {
printf("Usage: %s builtin|domain rid [access mask]\n", argv[0]);
@@ -1152,16 +1152,17 @@ static NTSTATUS cmd_samr_query_aliasmem(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_samr_query_aliasmem(cli, mem_ctx, &alias_pol,
- &num_members, &alias_sids);
+ result = rpccli_samr_GetMembersInAlias(cli, mem_ctx,
+ &alias_pol,
+ &sid_array);
if (!NT_STATUS_IS_OK(result))
goto done;
- for (i = 0; i < num_members; i++) {
+ for (i = 0; i < sid_array.num_sids; i++) {
fstring sid_str;
- sid_to_fstring(sid_str, &alias_sids[i]);
+ sid_to_fstring(sid_str, sid_array.sids[i].sid);
printf("\tsid:[%s]\n", sid_str);
}