Bug 599057 - Incomplete comparison of a service name in IPA access provider
Summary: Incomplete comparison of a service name in IPA access provider
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sssd (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Stephen Gallagher
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 579775
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 21:39:51 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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):
1.2

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
inclusion.

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
  Hosts: jennyv2.bos.redhat.com
  Services: su


sssd log:

(Tue Aug 10 16:29:57 2010) [sssd[be[bos.redhat.com]]] [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[bos.redhat.com]]] [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[bos.redhat.com]]] [evaluate_ipa_hbac_rules] (9): Current rule does not apply.
(Tue Aug 10 16:29:57 2010) [sssd[be[bos.redhat.com]]] [hbac_get_user_info_done] (3): Access denied.

sssd version:
sssd-1.2.1-26.el6.i686

ipa-client version:
ipa-client-2.0-9.el6.i686

ipa-server version:
ipa-server-1.91-0.2010080617git830910d.fc12.i686

Comment 6 releng-rhel@redhat.com 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.