From: Volker Lendecke Date: Tue, 23 Nov 2010 13:28:45 +0000 (+0100) Subject: v3-4-test: Correctly calculate the wbinfo -s result X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba-ctdb.git;a=commitdiff_plain;h=83159c0032d958ebdebecf75629feae888e00a6b v3-4-test: Correctly calculate the wbinfo -s result --- diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 74fd08276c..f02586ac43 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -285,6 +285,8 @@ static NTSTATUS rpccli_lsa_lookup_sids_generic(struct rpc_pipe_client *cli, char **domains = NULL; char **names = NULL; enum lsa_SidType *types = NULL; + bool have_mapped = false; + bool have_unmapped = false; if (num_sids) { if (!(domains = TALLOC_ARRAY(mem_ctx, char *, num_sids))) { @@ -344,14 +346,21 @@ static NTSTATUS rpccli_lsa_lookup_sids_generic(struct rpc_pipe_client *cli, goto fail; } - /* adapt overall result */ - if (( NT_STATUS_IS_OK(result) && - !NT_STATUS_IS_OK(hunk_result)) - || - ( NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) && - !NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED))) - { - result = STATUS_SOME_UNMAPPED; + if (NT_STATUS_IS_OK(hunk_result)) { + have_mapped = true; + } + if (NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED)) { + have_unmapped = true; + } + if (NT_STATUS_EQUAL(hunk_result, STATUS_SOME_UNMAPPED)) { + int i; + for (i=0; i