From: Ralph Boehme Date: Sat, 1 Apr 2017 14:44:45 +0000 (+0200) Subject: s3/include: add NT_STATUS_LOOKUP_ERR X-Git-Tag: samba-4.6.3~20 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6526a279ae9eb9cc2a665b82a74804382ee56879;p=thirdparty%2Fsamba.git 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 (cherry picked from commit fc37c7327dc7e4ad4405e324fc88d4bbf9b6ef9e) --- 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