jsynacek(a)redhat.com wrote:
Full_Name: Jan Synacek
Version: 2.4.29
OS: Fedora 16
URL:
http://jsynacek.fedorapeople.org/openldap/jsynacek-20120216-constraint-co...
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-co...
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.)
The attached file is derived from OpenLDAP Software. All of the
modifications
to
OpenLDAP Software represented in the following patch(es) were developed by Red
Hat. Red Hat has not assigned rights and/or interest in this work to any party.
I, Jan Synacek am authorized by Red Hat, my employer, to release this work
under
the following terms.
Red Hat hereby place the following modifications to OpenLDAP Software (and only
these modifications) into the public domain. Hence, these modifications may be
freely used and/or redistributed for any purpose with or without attribution
and/or other notice.
--
-- Howard Chu
CTO, Symas Corp.
http://www.symas.com
Director, Highland Sun
http://highlandsun.com/hyc/
Chief Architect, OpenLDAP
http://www.openldap.org/project/