From 188c5195ede9825f30845f4aab549390ac67887e Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 18 Feb 2003 07:05:02 +0000 Subject: Check return code of string_to_sid. (Merge from HEAD) (This used to be commit 5d09aea6f78aa247dbd77617c93c2a1dd2e2702f) --- source3/rpcclient/cmd_lsarpc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 8afeb8e83b..57ec09ef63 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