Avoid the use of extensibleObject in ldap mapping backend.
[kai/samba.git] / source / dsdb / common / util.c
index b98112304c9549b71bf766003a3c45871af07c08..a571ae1f793e9150647faa6dc143ad323936a7ee 100644 (file)
@@ -1040,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;
        }