This is a multi-part message in MIME format.
--------------000604070905040801090708
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
On 11/08/2012 08:14 AM, michael@stroeder.com wrote:
FYI: I sent output of bt full to Jan with some data stripped because of
privacy concerns.
Note that the entry for which constraint checking is done is added to the
database. So something might be wrong *after* the check.
Ciao, Michael.
Can you please try the attached patch? If it doesn't fix the issue (or breaks
something else that I'm not aware of) I will need a reproducer config and data.
Thank you,
--
Jan Synacek
Software Engineer, BaseOS team Brno, Red Hat
--------------000604070905040801090708
Content-Type: text/x-patch;
name="tmp.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="tmp.patch"
diff --git a/servers/slapd/overlays/constraint.c b/servers/slapd/overlays/constraint.c
index ee8911b..f2c645c 100644
--- a/servers/slapd/overlays/constraint.c
+++ b/servers/slapd/overlays/constraint.c
@@ -935,10 +935,6 @@ constraint_update( Operation *op, SlapReply *rs )
/* Do we need to count attributes? */
for(cp = c; cp; cp = cp->ap_next) {
- if (cp->restrict_lud && constraint_check_restrict(op, cp, target_entry) == 0) {
- continue;
- }
-
if (cp->count != 0) {
if (rc != 0 || target_entry == NULL) {
Debug(LDAP_DEBUG_TRACE,
@@ -950,6 +946,10 @@ constraint_update( Operation *op, SlapReply *rs )
goto mod_violation;
}
+ if (cp->restrict_lud && constraint_check_restrict(op, cp, target_entry) == 0) {
+ continue;
+ }
+
is_v = constraint_check_count_violation(m, target_entry, cp);
Debug(LDAP_DEBUG_TRACE,
--------------000604070905040801090708--