]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/include: add NT_STATUS_LOOKUP_ERR
authorRalph Boehme <slow@samba.org>
Sat, 1 Apr 2017 14:44:45 +0000 (16:44 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 20 Apr 2017 10:23:18 +0000 (12:23 +0200)
Useful helper macro to check the return value of LSA and SAMR
translations.

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>
(cherry picked from commit fc37c7327dc7e4ad4405e324fc88d4bbf9b6ef9e)

source3/include/lsa.h

index 7681aed4c766af97f33cb40c12d983b1b5e3a95f..c23e942f78a757881d0b45e90324ac9ca1864b47 100644 (file)
@@ -22,4 +22,8 @@ int init_lsa_ref_domain_list(TALLOC_CTX *mem_ctx,
                             const char *dom_name,
                             struct dom_sid *dom_sid);
 
+#define NT_STATUS_LOOKUP_ERR(status) \
+       (!NT_STATUS_IS_OK(status) && \
+        !NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED) && \
+        !NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED))
 #endif