[Date Prev][Date Next] [Chronological] [Thread] [Top]

Error 18 when removing selected values of certain attributes (ITS#990)



Full_Name: Claire Young
Version: 2.0.6
OS: Linux
URL: 
Submission from: (NULL) (217.21.129.8)


In our OpenLDAP system we have organizationalPerson entries with
telephoneNumber,
facsimileTelephoneNumber and postalAddress attributes, among others. We are
using the
defininition of these from the provided schema.

We have discovered that we cannot remove selected values of
facsimileTelephoneNumber
and postalAddress attributes, but we can remove all values of these attributes
and 
selected values of other attributes, such as telephoneNumber.

This problem happens regardless of the client used. You can reproduce it using
the 
command line tool, ldapmodify, and a server with an organizationalPerson to 
which you can add telephoneNumber and facsimileTelephoneNumber attributes.

1. Run:

ldapmodify -D <admin_dn> -w<admin_passwd> -h <host> -p<port> -f addFax

where addFax contains:

replica: <host>:<port>
dn: <dn_person_to_modify>
changetype: modify
add: facsimiletelephonenumber
facsimiletelephonenumber:010101

This works. 

2. Run:

ldapmodify -D <admin_dn> -w<admin_passwd> -h <host> -p<port> -f addTelephone

where addTelephone contains:

replica: <host>:<port>
dn: <dn_person_to_modify>
changetype: modify
add: telephonenumber
telephonenumber:010101

This works:

3.  ldapmodify -D <admin_dn> -w<admin_passwd> -h <host> -p<port> -f removeFax

where removeFax contains:

replica: <host>:<port>
dn: <dn_person_to_modify>
changetype: modify
delete: facsimiletelephonenumber
facsimiletelephonenumber:010101

This fails, with the following error message:

ldap_modify: Inappropriate matching
ldap_modify: additional info: modify: delete values failed

4. ldapmodify -D <admin_dn> -w<admin_passwd> -h <host> -p<port> -f removeAllFax

where removeAllFax contains:

replica: <host>:<port>
dn: <dn_person_to_modify>
changetype: modify
delete: facsimiletelephonenumber

This works.

5. ldapmodify -D <admin_dn> -w<admin_passwd> -h <host> -p<port> -f
removeTelephone

where removeTelephone contains:

replica: <host>:<port>
dn: <dn_person_to_modify>
changetype: modify
delete: telephonenumber
telephonenumber:010101

This works.

This test can be repeated with clients such as Jarek Gawor's Java LDAP
Browser/Editor
and with our own code, which uses the JDNI Java packages. The value of the fax
or 
address seems to be irrelevant - the remove always fails for these attributes.