From fc37c7327dc7e4ad4405e324fc88d4bbf9b6ef9e Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 1 Apr 2017 16:44:45 +0200 Subject: [PATCH] s3/include: add NT_STATUS_LOOKUP_ERR 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 Reviewed-by: Jeremy Allison --- source3/include/lsa.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/include/lsa.h b/source3/include/lsa.h index 7681aed4c76..c23e942f78a 100644 --- a/source3/include/lsa.h +++ b/source3/include/lsa.h @@ -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