Description of problem: With the uniqueness plugin activated, creating a new entry violating the created constraint generates a generic message. It would be more user-friendly to give the name of the concerned attribute. Version-Release number of selected component (if applicable): How reproducible: Activate the uniqueness plugin for an attribute. Create a new entry reusing the value of an existing entry. Read the error message Actual results: Problem An error occurred while contacting the LDAP server. (Constraint violation - Another entry with the same attribute value already exists) The server was unable to fulfill your request, because the request violates a constraint. Expected results: Problem An error occurred while contacting the LDAP server. (Constraint violation - Another entry with the same value for attribute "name_of_attribute" already exists) The server was unable to fulfill your request, because the request violates a constraint on attribute "name_of_attribute".
Created attachment 456328 [details] Patch
Pushed to master. Thanks to Rich for his review! Counting objects: 13, done. Delta compression using 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 936 bytes, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 20833de..d46f51d master -> master
[root@testvm data]# ldapadd -x -h localhost -p 1389 -D "cn=Directory Manager" -w Secret123 << EOF > dn: uid=tuser0,dc=example,dc=com > cn: tuser0 > sn: tuser0 > givenname: tuser0 > objectclass: top > objectclass: person > objectclass: organizationalPerson > objectclass: inetOrgPerson > uid: tuser0 > mail: ams > userpassword: amsamsams > EOF adding new entry "uid=tuser0,dc=example,dc=com" ldap_add: Constraint violation (19) additional info: Another entry with the same attribute value already exists (attribute: "uid")