s4-dsdb Return ACL errors as ldb_errstring()
[amitay/samba.git] / source4 / dsdb / common / dsdb_access.c
index 39e67b7793a34484bcfa01719f0ecebe58d815c1..b8784fc62f7bafef83c6ec24254ee3eff54788d1 100644 (file)
@@ -124,6 +124,9 @@ int dsdb_check_access_on_dn_internal(struct ldb_context *ldb,
                               dn,
                               true,
                               10);
+               ldb_asprintf_errstring(ldb,
+                                      "dsdb_access: Access check failed on %s",
+                                      ldb_dn_get_linearized(dn));
                return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS;
        }
        return LDB_SUCCESS;