Bug 461321

Summary: named MLS AVC creating symbolic link `/var/run/named.pid': Permission denied
Product: [Fedora] Fedora Reporter: Robert Story <rs>
Component: selinux-policy-mlsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 9CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-16 20:52:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Story 2008-09-05 20:17:46 UTC
Description of problem:
named cannot create /var/run/named.pidin MLS enforcing mode.

Version-Release number of selected component (if applicable):
selinux-policy-mls-3.3.1-84.fc9.noarch

How reproducible:
always

Steps to Reproduce:
1. enable MLS policy
2. run_init service named start
3.
  
Actual results:
ln: creating symbolic link `/var/run/named.pid': Permission denied]

Expected results:
no error

Additional info:
type=AVC msg=audit(1220627337.399:338): avc:  denied  { create } for  pid=2089 comm="ln" name="named.pid" scontext=system_u:system_r:initrc_t:s0-s15:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=lnk_file

This audit2allow created rule works great:

module named 1.0;

require {
        type var_run_t;
        type initrc_t;
        class lnk_file create;
}

#============= initrc_t ==============
allow initrc_t var_run_t:lnk_file create;

Comment 1 Daniel Walsh 2008-09-08 13:37:36 UTC
You can allow this for now.

# audit2allow -M mypol -l -i /var/log/audit/audit.log
# semodule -i mypol.pp

Fixed in selinux-policy-3.3.1-89.fc9.noarch

Comment 2 Robert Story 2008-10-16 16:40:14 UTC
confirmed, this bug can be closed.

Comment 3 Daniel Walsh 2008-10-16 20:52:31 UTC
Feel free to close bugs you confirm.