s4-dsdb Return ACL errors as ldb_errstring()
[amitay/samba.git] / source4 / dsdb / samdb / ldb_modules / acl_util.c
index cce504dc97713113d309728ccba796fc169d0f3f..50bf88869158e5a1ff9eb649956c2c7edd1f5c23 100644 (file)
@@ -77,7 +77,9 @@ int dsdb_module_check_access_on_dn(struct ldb_module *module,
                                    DSDB_SEARCH_SHOW_RECYCLED,
                                    parent);
        if (ret != LDB_SUCCESS) {
-               DEBUG(0,("access_check: failed to find object %s\n", ldb_dn_get_linearized(dn)));
+               ldb_asprintf_errstring(ldb_module_get_ctx(module),
+                                      "access_check: failed to find object %s\n",
+                                      ldb_dn_get_linearized(dn));
                return ret;
        }
        return dsdb_check_access_on_dn_internal(ldb, acl_res,