summaryrefslogtreecommitdiff
path: root/source3/include/lsa.h
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-04-01 16:44:45 +0200
committerJeremy Allison <jra@samba.org>2017-04-07 22:52:24 +0200
commitfc37c7327dc7e4ad4405e324fc88d4bbf9b6ef9e (patch)
tree8a48368abbc7374abdcaaa2514f9de01760fc6cb /source3/include/lsa.h
parent893fc5abbe0a1b63ebd81f442a8d544572ed76a9 (diff)
downloadsamba-fc37c7327dc7e4ad4405e324fc88d4bbf9b6ef9e.tar.gz
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 <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include/lsa.h')
-rw-r--r--source3/include/lsa.h4
1 files changed, 4 insertions, 0 deletions
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