Bug 1346900

Summary: some cluster related directories are mislabeled because of a missing type_transition rule
Product: Red Hat Enterprise Linux 7 Reporter: Milos Malik <mmalik>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-84.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 02:32:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2016-06-15 15:25:46 UTC
Description of problem:
# sesearch -s cluster_t -t var_run_t -T
Found 3 semantic te rules:
   type_transition cluster_t var_run_t : file cluster_var_run_t; 
   type_transition cluster_t var_run_t : sock_file cluster_var_run_t; 
   type_transition cluster_t var_run_t : fifo_file cluster_var_run_t; 

Similar rule for directories is missing.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.13.1-79.el7.noarch
selinux-policy-3.13.1-79.el7.noarch

How reproducible:
 * very often on machines configured for use in cluster

Steps to Reproduce:
 * don't know yet

Actual results:
# restorecon -Rv /run
restorecon reset /run/heartbeat context system_u:object_r:var_run_t:s0->system_u:object_r:cluster_var_run_t:s0
restorecon reset /run/heartbeat/rsctmp context system_u:object_r:var_run_t:s0->system_u:object_r:cluster_var_run_t:s0
restorecon reset /run/crm context system_u:object_r:var_run_t:s0->system_u:object_r:cluster_var_run_t:s0
#

Comment 1 Milos Malik 2016-06-15 15:29:19 UTC
# rpm -qf /run/heartbeat/
file /run/heartbeat is not owned by any package
# rpm -qf /run/crm/
file /run/crm is not owned by any package
# ls -dZ /run/heartbeat/
drwxr-x--x. root root system_u:object_r:cluster_var_run_t:s0 /run/heartbeat/
# ls -dZ /run/heartbeat/rsctmp/
drwxr-x--x. root root system_u:object_r:cluster_var_run_t:s0 /run/heartbeat/rsctmp/
# ls -dZ /run/crm/
drwxr-x---. hacluster haclient system_u:object_r:cluster_var_run_t:s0 /run/crm/
#

Comment 6 errata-xmlrpc 2016-11-04 02:32:08 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://rhn.redhat.com/errata/RHBA-2016-2283.html