From 05e3070b23c2ae4432a2243b31c3d89229fff979 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 18 Feb 2003 01:35:19 +0000 Subject: cmd_lsa_lookup_sids: Check return code from string_to_sid; skip SIDs which are not valid. (This used to be commit bfb6104521bd75da71a09a6c56bd44560416116e) --- source3/rpcclient/cmd_lsarpc.c | 7 +++++-- 1 file 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 */ -- cgit