On 07/27/2012 10:47 PM, michael(a)stroeder.com wrote:
> Full_Name:
> Version: RE24 8a0ce24c5abaf687a41696d988f6a1330128368d
> OS:
> URL:
> Submission from: (NULL) (79.227.171.183)
>
>
> It seems there's a regression in slapo-constraint possibly caused by a patch for
> ITS#7168.
>
> If the client sends valid data which not violates a constraint
> CONSTRAINT_VIOLATION is returned:
>
> delete: departmentNumber
> departmentNumber: old_number
> -
> add: departmentNumber
> departmentNumber: new_number
> -
>
> It seems turning off only the constraint for departmentNumber does not help.
> Turning off all constraints makes it work.
>
This works for me:
slapd.ldif:
...
dn: olcOverlay=constraint,olcDatabase={1}bdb,cn=config
objectClass: olcOverlayConfig
objectClass: olcConstraintConfig
olcOverlay: constraint
olcConstraintAttribute: mail count 3
olcConstraintAttribute: description count 2
...
root.ldif:
dn: dc=my-domain,dc=com
objectclass: dcObject
objectclass: organization
dc: my-domain
o: My Domain corp.
user.ldif:
dn: cn=usr2,dc=my-domain,dc=com
objectclass: inetOrgPerson
objectclass: organizationalPerson
cn: usr2
sn: usr2
mail: original(a)email.com
description: desc1
description: desc2
test.ldif:
dn: cn=usr2,dc=my-domain,dc=com
changetype: modify
delete: description
description: desc1
-
add: description
description: desc1-mod
< operation is successful >
Am I misunderstanding something? If it still doesn't work for you, please,
provide more information including your configuration and an example that fails.
--
Jan Synacek
Software Engineer, BaseOS team Brno, Red Hat