Bug 744959

Summary: SELinux is preventing /sbin/iscsid from 'link' accesses on the file lock.
Product: [Fedora] Fedora Reporter: Ron Gonzalez <Lcstyle>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl, slawomir.czarko
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:2e40ab2f25fc1ce35f8444e6812237882df68abad7183c6ff59bc44b89fc8169
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:37:14 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 Ron Gonzalez 2011-10-11 00:19:57 UTC
SELinux is preventing /sbin/iscsid from 'link' accesses on the file lock.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that iscsid should be allowed link access on the lock file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep iscsid /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:iscsid_t:s0
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                lock [ file ]
Source                        iscsid
Source Path                   /sbin/iscsid
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iscsi-initiator-utils-6.2.0.872-12.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug
                              30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   7
First Seen                    Wed 10 Aug 2011 06:59:27 AM EDT
Last Seen                     Mon 10 Oct 2011 08:09:58 PM EDT
Local ID                      59064d6b-f60c-483d-9bf9-216783718d5f

Raw Audit Messages
type=AVC msg=audit(1318291798.706:18): avc:  denied  { link } for  pid=1108 comm="iscsid" name="lock" dev=tmpfs ino=16152 scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1318291798.706:18): arch=x86_64 syscall=link success=no exit=EACCES a0=448f6f a1=448f84 a2=d a3=40 items=0 ppid=1 pid=1108 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=iscsid exe=/sbin/iscsid subj=system_u:system_r:iscsid_t:s0 key=(null)

Hash: iscsid,iscsid_t,var_lock_t,file,link

audit2allow

#============= iscsid_t ==============
allow iscsid_t var_lock_t:file link;

audit2allow -R

#============= iscsid_t ==============
allow iscsid_t var_lock_t:file link;

Comment 1 Daniel Walsh 2011-10-11 17:02:16 UTC
We have this rule in F16, is part of systemd getting back ported?

Comment 2 Fedora Update System 2011-11-16 16:18:56 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 3 Fedora Update System 2011-11-17 23:37:17 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2011-12-04 02:37:14 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.