Bug 1002245

Summary: SELinux is preventing /usr/bin/rm from 'getattr' accesses on the file /run/lock/subsys/shorewall.
Product: [Fedora] Fedora Reporter: Ashley <ashley>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9dbb4130fd3459cfe1fa6e529f7952322cd6e2cca382f25c30648ce2051403ed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-28 20:10:54 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 Ashley 2013-08-28 17:24:34 UTC
Description of problem:
SELinux is preventing /usr/bin/rm from 'getattr' accesses on the file /run/lock/subsys/shorewall.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/run/lock/subsys/shorewall default label should be shorewall_lock_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /run/lock/subsys/shorewall

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that rm should be allowed getattr access on the shorewall 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 rm /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:shorewall_t:s0
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                /run/lock/subsys/shorewall [ file ]
Source                        rm
Source Path                   /usr/bin/rm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           coreutils-8.21-11.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.5-301.fc19.x86_64 #1 SMP Tue
                              Jun 11 19:39:38 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-28 16:53:42 SAST
Last Seen                     2013-08-28 16:53:42 SAST
Local ID                      bcae7e39-28dd-4ef6-be93-d3ad95881502

Raw Audit Messages
type=AVC msg=audit(1377701622.415:1185): avc:  denied  { getattr } for  pid=7599 comm="rm" path="/run/lock/subsys/shorewall" dev="tmpfs" ino=76036 scontext=system_u:system_r:shorewall_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1377701622.415:1185): arch=x86_64 syscall=newfstatat success=no exit=EACCES a0=ffffffffffffff9c a1=fbb3f8 a2=fbb368 a3=100 items=0 ppid=7513 pid=7599 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=pts3 comm=rm exe=/usr/bin/rm subj=system_u:system_r:shorewall_t:s0 key=(null)

Hash: rm,shorewall_t,var_lock_t,file,getattr

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.5-301.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-08-28 20:10:54 UTC
restorecon -R -v /run/lock/subsys/shorewall