summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-14 01:32:56 +0100
committerGünther Deschner <gd@samba.org>2008-02-14 01:32:56 +0100
commit2b84f4119d0d5dc0eac0e3596260901e3dc3eefd (patch)
tree4245d2d018d353f15a6459f6d98bdece605fa40c /source3/rpcclient
parent0460295c1fe1c3103bbe03d6ca5a8028d79f1704 (diff)
downloadsamba-2b84f4119d0d5dc0eac0e3596260901e3dc3eefd.tar.gz
samba-2b84f4119d0d5dc0eac0e3596260901e3dc3eefd.tar.bz2
samba-2b84f4119d0d5dc0eac0e3596260901e3dc3eefd.zip
Use rpccli_lsa_EnumAccounts() in net and rpcclient.
Guenther (This used to be commit bdbcfa4419a54b98ea577b0052894ddaa06890ce)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index c014dba676..6e12a90982 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -550,8 +550,7 @@ static NTSTATUS cmd_lsa_enum_sids(struct rpc_pipe_client *cli,
uint32 enum_context=0;
uint32 pref_max_length=0x1000;
- DOM_SID *sids;
- uint32 count=0;
+ struct lsa_SidArray sid_array;
int i;
if (argc > 3) {
@@ -572,19 +571,22 @@ static NTSTATUS cmd_lsa_enum_sids(struct rpc_pipe_client *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = rpccli_lsa_enum_sids(cli, mem_ctx, &pol, &enum_context, pref_max_length,
- &count, &sids);
+ result = rpccli_lsa_EnumAccounts(cli, mem_ctx,
+ &pol,
+ &enum_context,
+ &sid_array,
+ pref_max_length);
if (!NT_STATUS_IS_OK(result))
goto done;
/* Print results */
- printf("found %d SIDs\n\n", count);
+ printf("found %d SIDs\n\n", sid_array.num_sids);
- for (i = 0; i < count; i++) {
+ for (i = 0; i < sid_array.num_sids; i++) {
fstring sid_str;
- sid_to_fstring(sid_str, &sids[i]);
+ sid_to_fstring(sid_str, sid_array.sids[i].sid);
printf("%s\n", sid_str);
}