summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2005-02-28 11:11:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:49 -0500
commitde1c7564302d1b506694ce4262ea0e939c661acd (patch)
treee694e872d3175814e2f94f84091c7a0a1ff4614f /source3/rpcclient
parentac1cc8712295fafc007d1341e68b84cfb7b7b7a1 (diff)
downloadsamba-de1c7564302d1b506694ce4262ea0e939c661acd.tar.gz
samba-de1c7564302d1b506694ce4262ea0e939c661acd.tar.bz2
samba-de1c7564302d1b506694ce4262ea0e939c661acd.zip
r5592: Oops, accidentally committed test version of rpcclient. Reverting changes.
(This used to be commit a5fe34ca7d57c18f510b9cc68e75c4db370fe052)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 3fca535ff0..bcb131a76c 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -192,7 +192,6 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
char **names;
uint32 *types;
int i;
- int nsids = atoi(argv[2]);
if (argc == 1) {
printf("Usage: %s [sid1 [sid2 [...]]]\n", argv[0]);
@@ -208,22 +207,22 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Convert arguments to sids */
- sids = TALLOC_ARRAY(mem_ctx, DOM_SID, nsids);
+ sids = TALLOC_ARRAY(mem_ctx, DOM_SID, argc - 1);
if (!sids) {
printf("could not allocate memory for %d sids\n", argc - 1);
goto done;
}
- for (i = 0; i < nsids; i++)
- if (!string_to_sid(&sids[i], argv[1])) {
+ for (i = 0; i < argc - 1; i++)
+ if (!string_to_sid(&sids[i], argv[i + 1])) {
result = NT_STATUS_INVALID_SID;
goto done;
}
/* Lookup the SIDs */
- result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, nsids, sids,
+ result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids,
&domains, &names, &types);
if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) !=
@@ -234,7 +233,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
/* Print results */
- for (i = 0; i < nsids; i++) {
+ for (i = 0; i < argc - 1; i++) {
fstring sid_str;
sid_to_string(sid_str, &sids[i]);