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 835835 - Bad context of /dev/twa on RHEL7
Summary: Bad context of /dev/twa on RHEL7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-27 09:01 UTC by Michal Trunecka
Modified: 2014-09-30 23:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:44:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Trunecka 2012-06-27 09:01:52 UTC
Description of problem:
The RHEL6 test is checking if /dev/twa has context fixed_disk_device_t
but on RHEL7 it has context device_t. According to mail from mgrepl it is not correct and should be fixed.

Test:
/CoreOS/selinux-policy/Regression/bz547387-smartd-cannot-access-sg-devices
The test is based on this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=715227

Version-Release number of selected component (if applicable):
selinux-policy-3.10.0-131.el7.noarch

Comment 1 Miroslav Grepl 2012-06-28 13:40:01 UTC
Michal,
what does 

# grep -r tw /etc/selinux/targeted/contexts/files/ |grep fixed
/etc/selinux/targeted/contexts/files/file_contexts:/dev/tw[a-z][^/]+	-c	system_u:object_r:fixed_disk_device_t:s0

on RHEL7 system?

Comment 2 Milos Malik 2012-06-28 14:00:10 UTC
# matchpathcon /dev/twa
/dev/twa	system_u:object_r:device_t:s0
# matchpathcon /dev/twa0
/dev/twa0	system_u:object_r:fixed_disk_device_t:s0
# grep -r tw /etc/selinux/targeted/contexts/files/ | grep fixed
/etc/selinux/targeted/contexts/files/file_contexts:/dev/tw[a-z][^/]+	-c	system_u:object_r:fixed_disk_device_t:s0
#

Comment 3 Daniel Walsh 2012-06-29 22:31:33 UTC
+ means there has to be a non / after /dev/tw[a-z]

If we want to match on /dev/twa then we need /dev/tw[a-z][^/]*

Comment 5 Ludek Smid 2014-06-13 11:44:58 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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