Bug 846754

Summary: Automember normalizes the searched string and removes the space
Product: Red Hat Enterprise Linux 7 Reporter: Xiyang Dong <xdong>
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED DEFERRED QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.0CC: jgalipea, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 15:32:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiyang Dong 2012-08-08 15:34:24 UTC
Description of problem:

when do research of an existing rule with adding leading or trailing space on Automember page ,the rule still comes up as a search result
While doing the same procedure on the user page ,the user won't come out.

Search for existing user:
# ipa user-find "dnsuser1"
--------------
1 user matched
--------------
  User login: dnsuser1
  First name: dnsuser1
  Last name: dnsuser1
  Home directory: /home/dnsuser1
  Login shell: /bin/sh
  UID: 1574000029
  GID: 1574000029
  Account disabled: False
  Password: True
  Kerberos keys available: True
----------------------------
Number of entries returned 1
----------------------------


Searching with trailing space for user:
# ipa user-find "dnsuser1 "
---------------
0 users matched
---------------
----------------------------
Number of entries returned 0
----------------------------

Search for existing automember rule:
# ipa automember-find "www" --type=group
---------------
1 rules matched
---------------
  Automember Rule: www
----------------------------
Number of entries returned 1
----------------------------



Search for automember rule with trailing space
# ipa automember-find "www " --type=group
---------------
1 rules matched
---------------
  Automember Rule: www
----------------------------
Number of entries returned 1
----------------------------

Version-Release number of selected component (if applicable):

freeipa-server-2.99.0-0.20120807T0818Zgitbe96146.fc17.x86_64

How reproducible:

Always

Steps to Reproduce:

See description above
  
Actual results:

when do research of an existing rule with adding leading or trailing space on Automember page ,the rule still comes up as a search result


Expected results:

the rule not coming up.

Additional info:

Comment 1 Xiyang Dong 2012-08-08 15:41:44 UTC
Contents of /var/log/dirsrv/slapd-TESTRELM-COM/access includes:

[08/Aug/2012:10:47:41 -0400] conn=620 op=4 SRCH base="cn=users,cn=accounts,dc=testrelm,dc=com" scope=1 filter="(&(|(telephoneNumber=*dnsuser1*)(uid=*dnsuser1*)(title=*dnsuser1*)(sn=*dnsuser1*)(ou=*dnsuser1*)(givenName=*dnsuser1*))(objectClass=posixaccount))" attrs="telephoneNumber sshpubkeyfp uid title loginShell uidNumber gidNumber sn homeDirectory mail givenName nsAccountLock"


[08/Aug/2012:10:47:45 -0400] conn=621 op=4 SRCH base="cn=users,cn=accounts,dc=testrelm,dc=com" scope=1 filter="(&(|(telephoneNumber=*dnsuser1 *)(uid=*dnsuser1 *)(title=*dnsuser1 *)(sn=*dnsuser1 *)(ou=*dnsuser1 *)(givenName=*dnsuser1 *))(objectClass=posixaccount))" attrs="telephoneNumber sshpubkeyfp uid title loginShell uidNumber gidNumber sn homeDirectory mail givenName nsAccountLock"


[08/Aug/2012:10:48:06 -0400] conn=622 op=4 SRCH base="cn=group,cn=automember,cn=etc,dc=testrelm,dc=com" scope=2 filter="(&(|(cn=*www*)(autoMemberExclusiveRegex=*www*)(autoMemberInclusiveRegex=*www*)(autoMemberTargetGroup=*www*)(autoMemberDefaultGroup=*www*)(description=*www*))(&(objectClass=top)(objectClass=automemberregexrule)))" attrs="description autoMemberExclusiveRegex autoMemberInclusiveRegex autoMemberTargetGroup autoMemberDefaultGroup cn"


[08/Aug/2012:10:48:12 -0400] conn=623 op=4 SRCH base="cn=group,cn=automember,cn=etc,dc=testrelm,dc=com" scope=2 filter="(&(|(cn=*www *)(autoMemberExclusiveRegex=*www *)(autoMemberInclusiveRegex=*www *)(autoMemberTargetGroup=*www *)(autoMemberDefaultGroup=*www *)(description=*www *))(&(objectClass=top)(objectClass=automemberregexrule)))" attrs="description autoMemberExclusiveRegex autoMemberInclusiveRegex autoMemberTargetGroup autoMemberDefaultGroup cn"

Comment 3 Dmitri Pal 2012-08-08 18:35:54 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2988

Comment 5 Martin Kosek 2015-01-21 15:32:16 UTC
Thank you taking your time and submitting this request for Red Hat Enterprise Linux. Unfortunately, this bug was not given a priority and was deferred both in the upstream project and in Red Hat Enterprise Linux.

Given that we are unable to fulfill this request in following Red Hat Enterprise Linux releases, I am closing the Bugzilla as DEFERRED. To request that Red Hat re-considers the decision, please re-open the Bugzilla via appropriate support channels and provide additional business and/or technical details about its importance to you.

Note that you can still track this request or even contribute patches in the referred upstream Trac ticket.