s3/rpc_client: lookupsids error handling of NT_STATUS_NONE_MAPPED
authorRalph Boehme <slow@samba.org>
Sat, 1 Apr 2017 14:51:07 +0000 (16:51 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 7 Apr 2017 20:52:24 +0000 (22:52 +0200)
NT_STATUS_NONE_MAPPED is not a fatal error, it just means we must return
all lsa_TranslatedName's as type SID_NAME_UNKNOWN.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12728

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/cli_lsarpc.c

index 70952f62bab648c0b0b9738fb53cf4377b4596cb..41c1ef482f4d6210245506a834da7b46c79a9c13 100644 (file)
@@ -28,6 +28,7 @@
 #include "rpc_client/cli_lsarpc.h"
 #include "rpc_client/init_lsa.h"
 #include "../libcli/security/security.h"
+#include "lsa.h"
 
 /** @defgroup lsa LSA - Local Security Architecture
  *  @ingroup rpc_client
@@ -221,7 +222,7 @@ static NTSTATUS dcerpc_lsa_lookup_sids_noalloc(struct dcerpc_binding_handle *h,
                        return status;
                }
 
-               if(!NT_STATUS_IS_ERR(result)) {
+               if (!NT_STATUS_LOOKUP_ERR(result)) {
                        lsa_names.count = lsa_names2.count;
                        lsa_names.names = talloc_array(mem_ctx,
                                                       struct lsa_TranslatedName,