Ldap LDAP doesn't return correct results when the search filter contains a sized attribute

  • 3648007
  • 15-Feb-2008
  • 26-Apr-2012

Environment

Novell eDirectory 8.7.3 for All Platforms
Novell eDirectory 8.8 for All Platforms

Situation

When doing a substring search for an attribute, with a size limit and the filter is longer than the attribute upper-limit, no results are returned, even if the object with this attribute and value does exist
The schema definition for an attribute eg newattrib is CI_STRING with upper-bound of 5. An object is created with an attribute "newattr:abcde". When an ldapsearch is performed with the filter newattr=abcde* then the object is not found.
If the search filter is shortened to newattr=abcd* or newattr=abcde the correct data is returned.

Resolution

Workaround:
To work around this issue the upper-bound on the attribute needs to be increased or the search filter length needs to be decreased.

Status

Reported to Engineering

Additional Information

To verify if this is affecting you take a dstrace with +LDAP, +SRDT,+SRCH and +RECM filters turned on. In the trace it can be observed that the incorrect filter is passed to the flaim layer:
New cleartext connection 0x52439120 from 127.0.0.1:40993, monitor = 0x54a69bb0, index = 6
(127.0.0.1:40993)(0x0001:0x60) DoBind on connection 0x52439120
(127.0.0.1:40993)(0x0001:0x60) Bind name:cn=admin,o=novell, version:3, authentication:simple
(127.0.0.1:40993)(0x0001:0x60) Sending operation result 0:"":"" to connection 0x52439120
(127.0.0.1:40993)(0x0002:0x63) DoSearch on connection 0x52439120
(127.0.0.1:40993)(0x0002:0x63) Search request:
base: ""
scope:2 dereference:0 sizelimit:0 timelimit:0 attrsonly:0
filter: "(newattr=abcde*)"
attribute: "newattr"
DSASearch, Begin::
DSASearch, Top:: Version 4, Iterator 0xffffffff, Base .TESTTREE., Scope 2, NodesToSearch 0, InfoType 1, Flags 0x800002, Timeout 0, uCommandNum 0,
DSASearch, SubTree:: Version 4, Iterator 0xffffffff, Base .TESTTREE., Scope 2, NodesToSearch 0, InfoType 1, Flags 0x800002, Timeout 0, CommandNum 0 , EntryCount 0, Error succeeded
Iter #52467970 query ((Flags&1)==1) && ((0))
Iter #52467970 NO INDEX USED
Iter #52467970 first( ID_INVALID)

Feedback service temporarily unavailable. For content questions or problems, please contact Support.