]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb: Add dsdb_werror() macro
authorJo Sutton <josutton@catalyst.net.nz>
Mon, 12 Feb 2024 22:52:06 +0000 (11:52 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (02:41 +0000)
This works like dsdb_module_werror(), but does not require an ldb module
to work.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util.h

index 69a88b8b2a09b064d9d3f2554e2dbe58bc4b285b..78adb91a37c16fb92aa60bfcd1deb9550cda7f0a 100644 (file)
@@ -87,6 +87,9 @@ int dsdb_werror_at(struct ldb_context *ldb, int ldb_ecode, WERROR werr,
                   const char *location, const char *func,
                   const char *reason);
 
+#define dsdb_werror(ldb, ldb_ecode, werr, reason) \
+       dsdb_werror_at(ldb, ldb_ecode, werr, __location__, __func__, reason)
+
 #define dsdb_module_werror(module, ldb_ecode, werr, reason) \
        dsdb_werror_at(ldb_module_get_ctx(module), ldb_ecode, werr, \
                       __location__, __func__, reason)