Bug 447403 - selinux utilities report incorrect context for /var/lib/iscsi* objects
selinux utilities report incorrect context for /var/lib/iscsi* objects
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks: 445005
  Show dependency treegraph
 
Reported: 2008-05-19 15:56 EDT by Milan Zazrivec
Modified: 2015-09-29 05:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:31:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Zazrivec 2008-05-19 15:56:34 EDT
Description of problem:
matchpathcon reports incorrect context for /var/lib/iscsi or /var/lock/iscsi

Version-Release number of selected component (if applicable):
libselinux-1.33.4-5.el5
selinux-policy-2.4.6-137.el5

How reproducible:
Always

Steps to Reproduce:
1. Install RHEL5.2, iscsi-initiator-utils included, selinux enabled
2. # matchpathcon /var/lock/iscsi /var/lib/iscsi/
3. # grep iscsi /etc/selinux/targeted/contexts/files/file_contexts
  
Actual results:
# matchpathcon /var/lock/iscsi /var/lib/iscsi/
/var/lock/iscsi system_u:object_r:var_lock_t:s0
/var/lib/iscsi/ system_u:object_r:var_lib_t:s0
# grep iscsi /etc/selinux/targeted/contexts/files/file_contexts
/var/lib/iscsi(/.*)?    --      system_u:object_r:iscsi_var_lib_t:s0
/var/run/iscsid.pid     --      system_u:object_r:iscsi_var_run_t:s0
/var/lock/iscsi(/.*)?   --      system_u:object_r:iscsi_lock_t:s0
/sbin/iscsid    --      system_u:object_r:iscsid_exec_t:s0
Comment 1 Daniel Walsh 2008-05-19 20:28:01 EDT
Well in truth matchpathcon is reporting the correct context.

The file context you are showing, has -- which tells matchpathcon to only match
on files not directories.

The real fix is to remove the -- to make it match on any file type.
Comment 2 Milan Zazrivec 2008-05-20 02:32:54 EDT
I'm guessing libselinux is a wrong component then ...
Comment 3 Daniel Walsh 2008-05-20 11:34:29 EDT
Yes, fixed.
Comment 4 Daniel Walsh 2008-05-22 14:52:18 EDT
Fixed in selinux-policy-2.4.6-138.el5 
Comment 5 RHEL Product and Program Management 2008-06-02 15:58:34 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 9 errata-xmlrpc 2009-01-20 16:31:55 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0163.html

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