summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-02-18 01:35:19 +0000
committerMartin Pool <mbp@samba.org>2003-02-18 01:35:19 +0000
commit05e3070b23c2ae4432a2243b31c3d89229fff979 (patch)
treec453a3a70dbd9e97df492eebd34e6254998df49e
parent49c3018cbc5e85d5c492d20263edffd0f1bc7246 (diff)
downloadsamba-05e3070b23c2ae4432a2243b31c3d89229fff979.tar.gz
samba-05e3070b23c2ae4432a2243b31c3d89229fff979.tar.bz2
samba-05e3070b23c2ae4432a2243b31c3d89229fff979.zip
cmd_lsa_lookup_sids: Check return code from string_to_sid; skip SIDs
which are not valid. (This used to be commit bfb6104521bd75da71a09a6c56bd44560416116e)
-rw-r--r--source3/rpcclient/cmd_lsarpc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 91107a7c6d..03df170c09 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -210,8 +210,11 @@ static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
goto done;
}
- for (i = 0; i < argc - 1; i++)
- string_to_sid(&sids[i], argv[i + 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 */