Issue 6594 - Ldapsearch Error while using Back-NDB
Summary: Ldapsearch Error while using Back-NDB
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 17:49 UTC by priyesh.potdar@dimdim.com
Modified: 2014-08-01 21:06 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 priyesh.potdar@dimdim.com 2010-07-20 17:49:20 UTC
Full_Name: Priyesh Potdar
Version: 4.2.23
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (122.183.18.122)


An error comes while searching in ldap compiled with NDB support.

To reproduce the issue:

1) Import the below sample.ldif file to the database by issuing the
following command:
        /usr/local/sbin/slapadd -l sample.ldif

sample.ldif:

dn: dc=dimdim,dc=com
dc: dimdim
description: My wonderful company as much text as you want to place 
 in this line up to 32K continuation data for the line above must 
 have <CR> or <CR><LF> i.e. ENTER works 
 on both Windows and *nix system - new line MUST begin with ONE SPACE
objectClass: dcObject
objectClass: organization
o: Example, Inc.

dn: ou=people, dc=dimdim,dc=com
ou: people
description: All people in organisation
objectclass: organizationalunit

dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectclass: inetOrgPerson
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
sn: smith
uid: rjsmith
userpassword: rJsmitH
carlicense: HISCAR 123
homephone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
description: swell guy
ou: Human Resources

2) Start the ldap server and issue the command to search:
        ldapsearch -H ldap://192.168.3.47 -x -D "dc=dimdim,dc=com" -b
"dc=dimdim,dc=com" -w dimdim "(uid=rjsmith)"

3) It will return multiple results and that is the issue we are facing.

Output of the command:
# extended LDIF
#
# LDAPv3
# base <dc=dimdim,dc=com> with scope subtree
# filter: (uid=rjsmith)
# requesting: ALL
#

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# Robert Smith, people, dimdim.com
dn: cn=Robert Smith,ou=people,dc=dimdim,dc=com
objectClass: inetOrgPerson
userPassword:: ckpzbWl0SA==
description: swell guy
sn: smith
cn: Robert Smith
cn: Robert Pagal
cn: Howard Chu
ou: Human Resources
carLicense: HISCAR 123
homePhone: 555-111-2222
mail: r.smith@dimdim.com
mail: sampel1@yahoo.com
mail: sample2@gmail.com
uid: rjsmith

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

Kindly provide a solution for the same.
Comment 1 Howard Chu 2010-07-21 13:26:14 UTC
changed notes
Comment 2 Howard Chu 2010-07-21 13:26:15 UTC
published 6594
marked public
changed state Open to Closed
moved from Incoming to Archive.Incoming
Comment 3 OpenLDAP project 2014-08-01 21:06:18 UTC
dup #6593