Issue 7702 - hdb and mdb derefere aliases differently
Summary: hdb and mdb derefere aliases differently
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.36
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-20 13:24 UTC by COMBES Julien - SG/SPSSI/CPII/DOSE/ET/PNE MESSAGERIE
Modified: 2014-10-23 07:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description COMBES Julien - SG/SPSSI/CPII/DOSE/ET/PNE MESSAGERIE 2013-09-20 13:24:08 UTC
Full_Name: Julien COMBES
Version: 2.4.36
OS: debian squeeze
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (212.23.175.188)


Hello,

With openldap 2.4.36, i found a case where the aliases are deref differently
between hdb and mdb. A search with deref aliases on an attribut not indexed (or
on "*"), mdb backend returns the entry twice where hdb backend returns the entry
once. For example :

With a directory like that :
---------------------------------------------------------------------
dn: dc=test,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
dc: test
o: test

dn: ou=a,dc=test,dc=com
objectClass: top
objectClass: organizationalUnit
ou: a

dn: ou=b,ou=a,dc=test,dc=com
objectClass: top
objectClass: organizationalUnit
ou: b

dn: ou=c,ou=a,dc=test,dc=com
objectClass: top
objectClass: organizationalUnit
ou: c

dn: cn=foo,ou=b,ou=a,dc=test,dc=com
objectClass: top
objectClass: person
cn: foo
sn: foo

dn: cn=bar,ou=c,ou=a,dc=test,dc=com
objectClass: top
objectClass: alias
objectClass: extensibleObject
aliasedObjectName: cn=foo,ou=b,ou=a,dc=test,dc=com
cn: bar
---------------------------------------------------------------------

I have that kind of result :

-> Search on mdb, cn not indexed :
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

-> Search on mdb, cn indexed eq,sub :
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

-> Search on hdb, cn not indexed :
$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

-> Search on hdb
  $ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=foo dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=commits

$ ldapsearch -x -LLL -b "ou=a,dc=test,dc=com" cn=* dn -a always
dn: cn=foo,ou=b,ou=a,dc=test,dc=com

Regards,
Julien COMBES
P.S: I have first posted this message as a comment in ITS7577 the 25 Jul 2013.
But as the ITS7577 is tagged closed and has no answers since this date, I decide
to repost as a new report.
Comment 1 Howard Chu 2014-08-26 19:13:42 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 Quanah Gibson-Mount 2014-08-27 16:45:24 UTC
changed notes
changed state Test to Release
Comment 3 OpenLDAP project 2014-10-23 07:30:51 UTC
fixed in master
fixed in RE25
fixed in RE24
Comment 4 Quanah Gibson-Mount 2014-10-23 07:30:51 UTC
changed notes
changed state Release to Closed