[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
multivalued attribute bug / indexing bug (ITS#485)
Full_Name: Benjamin de los Angeles Jr.
Version: 1.2.9
OS: Linux 2.2.14
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (203.176.35.2)
There is a problem locating entries where a value in a multivalued attribute is
deleted. The search filter should use the multivalued attribute using '*' on
the leftmost side, i.e. mailalternateaddress=*somedomain.com.
Kurt D. Zeilenga <Kurt@OpenLDAP.org> says that this is an indexing bug in
1.2.9.
I guess this would only be noticed if you have multivalued attribute.
Here are outputs from openLDAP command line tools to reproduce the problem:
* Start by displaying current data
[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
"mailalternateaddress=*somedomain.com.ph"
-D "cn=test, dc=surfshop.net, dc=ph" -W
Enter LDAP Password:
cn=bench, dc=surfshop.net, dc=ph
cn=Benjamin de los Angeles Jr.
sn=de los Angeles
objectclass=person
objectclass=organizationalPerson
.
.
.
mailalternateaddress=zwark@somedomain.com.ph
mailalternateaddress=lazone@somedomain.com.ph
* Delete a value from a multivalued attribute using modify
MODIFY Data in a file:
dn: cn=bench, dc=surfshop.net, dc=ph
changetype: modify
delete: mailalternateaddress
mailalternateaddress: lazone@somedomain.com.ph
[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
-W -f tempdata/modify-delete
Enter LDAP Password:
delete mailalternateaddress:
lazone@somedomain.com.ph
modifying entry cn=bench, dc=surfshop.net, dc=ph
modify complete
* Display the matching entry again
[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
"mailalternateaddress=*somedomain.com.ph"
-D "cn=test, dc=surfshop.net, dc=ph" -W
Enter LDAP Password:
(No output! This is the PROBLEM)
* Add again an entry
DATA in a file:
dn: cn=bench, dc=surfshop.net, dc=ph
changetype: modify
add: mailalternateaddress
mailalternateaddress: lazone@somedomain.com.ph
[bench@ldap tools]$ ./ldapmodify -v -D "cn=test, dc=surfshop.net, dc=ph"
-W -f tempdata/modify-add
Enter LDAP Password:
add mailalternateaddress:
lazone@somedomain.com.ph
modifying entry cn=bench, dc=surfshop.net, dc=ph
modify complete
* Display the matching entry again
[bench@ldap tools]$ ./ldapsearch -b "dc=surfshop.net, dc=ph"
"mailalternateaddress=*somedomain.com.ph"
-D "cn=test, dc=surfshop.net, dc=ph" -W
Enter LDAP Password:
cn=bench, dc=surfshop.net, dc=ph
cn=Benjamin de los Angeles Jr.
sn=de los Angeles
objectclass=person
objectclass=organizationalPerson
.
.
.
mailalternateaddress=zwark@somedomain.com.ph
mailalternateaddress=lazone@somedomain.com.ph
( Magic! There goes the entry again! =) )