Avoid the use of extensibleObject in ldap mapping backend.
[kai/samba.git] / source / dsdb / common / util.c
index 5164f7d181c02e1024305d38323531f28f00a7e5..a571ae1f793e9150647faa6dc143ad323936a7ee 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "events.h"
 #include "ldb.h"
 #include "ldb_errors.h"
 #include "lib/util/util_ldb.h"
@@ -1039,7 +1040,7 @@ const struct dom_sid *samdb_domain_sid(struct ldb_context *ldb)
        }
 
        /* cache the domain_sid in the ldb */
-       if (ldb_set_opaque(ldb, "cache.domain_sid", domain_sid) != LDB_SUCCESS) {
+       if (ldb_set_opaque(ldb, "cache.domain_sid", discard_const_p(struct dom_sid, domain_sid)) != LDB_SUCCESS) {
                goto failed;
        }