On 06/07/2012 03:00 PM, Howard Chu wrote: > [email protected] wrote: >> Full_Name: Jan Synacek >> Version: 2.4.29 >> OS: Fedora 16 >> URL: >> http://jsynacek.fedorapeople.org/openldap/jsynacek-20120216-constraint-count.patch >> Submission from: (NULL) (209.132.186.34) >> >> >> Constraint overlay doesn't take into account multiple modifications when >> using >> count. >> >> Example: If count for 'description' attribute is set e.g. to 2, the following >> results in a constraint violation: >> >> dn: cn=usr2, dc=my-domain,dc=com >> add: description >> description: d1 >> description: d2 >> description: d3-viol >> >> However, this passes: >> >> dn: cn=usr2, dc=my-domain,dc=com >> add: description >> description: d1 >> - >> add: description >> description: d2 >> - >> add: description >> description: d3 >> >> This patch fixes the behavior in case multiple modifications are used. >> >> Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=742163 >> >> The patch is uploaded on fedorapeople.org: >> http://jsynacek.fedorapeople.org/openldap/jsynacek-20120216-constraint-count.patch >> >> I wasn't able to use ftp.openldap.org due to 'No space left' error. > > This code (and the original) don't seem to properly take deletes into > account. It resets the ce counter to 0 on any delete op, but it should be > decrementing based on the number of values provided. (And of course, it can > only do that if the specified value is actually present in the attribute.)
I'll fix the patch. I tested only deletes with no additional values. -- Jan Synacek Software Engineer, BaseOS team Brno, Red Hat
