summaryrefslogtreecommitdiff
path: root/source4/dsdb/common/util.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-01-12 15:51:01 +0100
committerVolker Lendecke <vl@samba.org>2016-02-01 09:53:10 +0100
commitcff0978495da54c019148709a07ccf5f947cf5ec (patch)
treef748902be5f5448d91867cc317765293e957d562 /source4/dsdb/common/util.h
parent58aa29b8444776874fc409ec0a063567de8b522e (diff)
downloadsamba-cff0978495da54c019148709a07ccf5f947cf5ec.tar.gz
s4:dsdb/common: add dsdb_module_werror() helper function
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source4/dsdb/common/util.h')
-rw-r--r--source4/dsdb/common/util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h
index dcf3fc44b13..10850736e7d 100644
--- a/source4/dsdb/common/util.h
+++ b/source4/dsdb/common/util.h
@@ -69,4 +69,14 @@ struct GUID;
char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid);
NTSTATUS NS_GUID_from_string(const char *s, struct GUID *guid);
+struct ldb_context;
+
+int dsdb_werror_at(struct ldb_context *ldb, int ldb_ecode, WERROR werr,
+ const char *location, const char *func,
+ const char *reason);
+
+#define dsdb_module_werror(module, ldb_ecode, werr, reason) \
+ dsdb_werror_at(ldb_module_get_ctx(module), ldb_ecode, werr, \
+ __location__, __func__, reason)
+
#endif /* __DSDB_COMMON_UTIL_H__ */