Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 599057 - Incomplete comparison of a service name in IPA access provider
Summary: Incomplete comparison of a service name in IPA access provider
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact: Chandrasekar Kannan
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-02 15:33 UTC by Sumit Bose
Modified: 2015-01-04 23:42 UTC (History)
3 users (show)

Fixed In Version: sssd-1.2.0-13.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-11-10 21:39:51 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Sumit Bose 2010-06-02 15:33:16 UTC
Description of problem:
In the IPA access provider the service name is only compared up to the length of the service name retrieved from LDAP, so if the value from LDAP is 'su' it will match 'su', 'su-l', 'sudo', ... This is not intended and should be fixed. 

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

How reproducible:

Steps to Reproduce:
1. Create a allow rule for 'su' and take care that there is no one for 'su-l' or and other rule that can match 'su-l', e.g. one with servicecategory=all
2. run 'su -l'
Actual results:
Access is granted

Expected results:
Access is denied, because there is not rule matching service 'su-l'

Comment 2 Stephen Gallagher 2010-06-02 15:37:23 UTC
Fix is available upstream already.

Comment 3 RHEL Product and Program Management 2010-06-02 15:50:40 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 5 Jenny Galipeau 2010-08-10 20:34:11 UTC
verified RHEL 6:

hbac su rule:

[root@dhcp-100-3-186 ~]# ipa hbac-show
Rule name: test1
  Rule name: test1
  Rule type: allow
  User category: all
  Source host category: all
  Enabled: TRUE
  Services: su

sssd log:

(Tue Aug 10 16:29:57 2010) [sssd[be[]]] [check_service] (9): OriginalDN for service [su-l]: [cn=su-l,cn=hbacservices,cn=accounts,dc=bos,dc=redhat,dc=com].
(Tue Aug 10 16:29:57 2010) [sssd[be[]]] [check_service] (9): Service [su-l] was not found in the list of allowed services and service groups.
(Tue Aug 10 16:29:57 2010) [sssd[be[]]] [evaluate_ipa_hbac_rules] (9): Current rule does not apply.
(Tue Aug 10 16:29:57 2010) [sssd[be[]]] [hbac_get_user_info_done] (3): Access denied.

sssd version:

ipa-client version:

ipa-server version:

Comment 6 2010-11-10 21:39:51 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.