svn commit: samba r5592 - in branches/SAMBA_3_0/source/rpcclient: .
jmcd at samba.org
jmcd at samba.org
Mon Feb 28 11:11:55 GMT 2005
Author: jmcd
Date: 2005-02-28 11:11:55 +0000 (Mon, 28 Feb 2005)
New Revision: 5592
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5592
Log:
Oops, accidentally committed test version of rpcclient. Reverting changes.
Modified:
branches/SAMBA_3_0/source/rpcclient/cmd_lsarpc.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpcclient/cmd_lsarpc.c
===================================================================
--- branches/SAMBA_3_0/source/rpcclient/cmd_lsarpc.c 2005-02-28 10:55:13 UTC (rev 5591)
+++ branches/SAMBA_3_0/source/rpcclient/cmd_lsarpc.c 2005-02-28 11:11:55 UTC (rev 5592)
@@ -192,7 +192,6 @@
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 @@
/* 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 @@
/* 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]);
More information about the samba-cvs
mailing list