Bug 172683

Summary: Search filter does not work on physical entries within views
Product: [Retired] 389 Reporter: Dirk Husung <husung>
Component: Server - PluginsAssignee: Jim Whitehurst <jim>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1CC: vtsuryawanshi
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: 1.0.2
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 17:18:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 183369    
Attachments:
Description Flags
LDIF file to import into a directory with root suffix dc=local and ou=People,dc=local
none
Proposed fix none

Description Dirk Husung 2005-11-08 11:19:43 UTC
Created attachment 120810 [details]
LDIF file to import into a directory with root suffix dc=local and ou=People,dc=local

Comment 1 Dirk Husung 2005-11-08 11:19:43 UTC
Description of problem:
A physical ou is created (by an application) within a virtual DIT view
(presented to the application as its baseDN). Any search with the virtual DIT
view as baseDN and an additional search filter yields the physical ou even if
the ou obviously doesn't match the search filter.

Version-Release number of selected component (if applicable):
fedora-ds-7.1-2.RHEL4.i386.opt.rpm

How reproducible:
always

Steps to Reproduce:
1. create a fresh directoy with root suffix dc=local and ou=People,dc=local
2. import appended LDIF file
3. do a ldapsearch with -b "ou=calendar,ou=views,dc=local" "(uid=FUser)"
  
Actual results:
version: 1
dn: uid=FUser,ou=People, dc=local
uid: FUser
seeAlso: calendar
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
givenName: First
sn: User
cn: First User

dn: ou=admins,ou=calendar,ou=views,dc=local
ou: admins
objectClass: top
objectClass: organizationalunit


Expected results:
Same as above, but without entry ou=admins

Additional info:

Comment 2 Pete Rowley 2006-01-04 02:54:50 UTC
This occurs only for subtree searches, the one level search returns the correct
result set.

Comment 3 Pete Rowley 2006-01-05 01:25:46 UTC
Created attachment 122801 [details]
Proposed fix

subtree view searches didn't use the client filter to limit the view subtree
portion of the match.

Comment 4 Pete Rowley 2006-01-05 21:26:58 UTC
Patch checked in

Comment 5 Orla Hegarty 2006-01-05 22:10:44 UTC
Patch needs to be verified in next round of QE per process. Reopening this bug and marking it as 
MODIFIED.

Comment 6 Michael Gregg 2007-11-19 22:19:56 UTC
 
Verified results with search:
"ou=calendar,ou=views,o=my.com" "(uid=FUser)"
ldapsearch: started Mon Nov 19 14:18:38 2007

ldap_init( legbreaker.usersys.redhat.com, 1111 )
filter pattern: (uid=FUser)
returning: ALL
filter is: (uid=FUser)
version: 1
dn: uid=FUser,ou=People, o=my.com
uid: FUser
seeAlso: calendar
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
givenName: First
sn: User
cn: First User
1 matches

Verified aginst:
1195508960 redhat-ds-base-8.0.0-11.el5dsrv Mon Nov 19 2007 
1195508963 redhat-ds-admin-8.0.0-1.15.el5dsrv Mon Nov 19 2007 
1195508965 redhat-ds-console-8.0.0-8.el5dsrv Mon Nov 19 2007 
1195508966 redhat-admin-console-8.0.0-9.el5dsrv Mon Nov 19 2007