RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1594245 - [RFE] sysadm_r should be included in default SELinux user map order
Summary: [RFE] sysadm_r should be included in default SELinux user map order
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.7-Alt
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 1658303
TreeView+ depends on / blocked
 
Reported: 2018-06-22 12:45 UTC by Luc de Louw
Modified: 2019-08-06 13:09 UTC (History)
8 users (show)

Fixed In Version: ipa-4.6.5-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1658303 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:09:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2241 0 None None None 2019-08-06 13:09:37 UTC

Description Luc de Louw 2018-06-22 12:45:24 UTC
Description of problem:

If one want to map a users to the SELinux role sysadm_r, it fails because it is not included in the default configuration of IPA. It is easy to add this with ipa config-mod. However, it would be more convenient for the users. 


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


How reproducible:
Always

Steps to Reproduce:
1. ipa selinuxusermap-add --selinuxuser='sysadm_u:s0-s0:c0.c1023' mapname


Actual results:
ipa: ERROR: SELinux user sysadm_u:s0-s0:c0.c1023 not found in ordering list (in config)

Expected results:
[root@ipa1 ~]# ipa selinuxusermap-add --selinuxuser='sysadm_u:s0-s0:c0.c1023' sysadmins
----------------------------------
Added SELinux User Map "sysadmins"
----------------------------------
  Rule name: sysadmins
  SELinux User: sysadm_u:s0-s0:c0.c1023
  Enabled: TRUE

Additional info:

Proper workaround:
ipa config-mod --ipaselinuxusermaporder='guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$sysadm_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023'

Thanks,

Luc

Comment 3 Rob Crittenden 2018-06-22 12:54:24 UTC
I think you need a stronger case on WHY this needs to be added, not just that it would be more convenient.

In all likelihood, if this were added, it would apply to new installs only.

Comment 4 Luc de Louw 2018-06-22 12:59:11 UTC
(In reply to Rob Crittenden from comment #3)
> I think you need a stronger case on WHY this needs to be added, not just
> that it would be more convenient.

It is a standard SELinux user role included in RHEL (like user_r, staff_r, guest_r) and used quite often. 


> 
> In all likelihood, if this were added, it would apply to new installs only.

That is IMHO okay, those users who want to make use of this probably already figured out how to enable sysadm_r

Thanks,

Luc

Comment 5 Rob Crittenden 2018-07-30 15:14:31 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/7658

Comment 7 Christian Heimes 2019-03-28 20:53:37 UTC
Fixed upstream
ipa-4-6:
https://pagure.io/freeipa/c/c742ff13c910d8156d06a944caba84e0b83bb3c6

Comment 9 Nikhil Dehadrai 2019-05-15 10:07:38 UTC
IPA version: ipa-server-4.6.5-8.el7.x86_64


Verified the bug on the basis of following observations:

1. Verified the error mentioned in description is no more observed and command 'selinuxusermap-add' is successful while using context 'sysadm_u:s0-s0:c0.c1023'.

[root@kvm-01-guest02 ~]# ipa selinuxusermap-add --selinuxuser='sysadm_u:s0-s0:c0.c1023' mapname
--------------------------------
Added SELinux User Map "mapname"
--------------------------------
  Rule name: mapname
  SELinux User: sysadm_u:s0-s0:c0.c1023
  Enabled: TRUE
[root@kvm-01-guest02 ~]# ipa selinuxusermap-add --selinuxuser='sysadm_u:s0-s0:c0.c1023' sysadmins
----------------------------------
Added SELinux User Map "sysadmins"
----------------------------------
  Rule name: sysadmins
  SELinux User: sysadm_u:s0-s0:c0.c1023
  Enabled: TRUE


Thus on basis of above observations, marking status of bug to 'VERIFIED'.

Comment 11 errata-xmlrpc 2019-08-06 13:09:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2241


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