Bug 917878 - SELinux is preventing /usr/sbin/apcupsd (deleted) from read access on the file LCK...
Summary: SELinux is preventing /usr/sbin/apcupsd (deleted) from read access on the fil...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 02:01 UTC by Garry T. Williams
Modified: 2013-03-11 01:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-11 01:24:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Garry T. Williams 2013-03-05 02:01:27 UTC
Description of problem:

SELinux is preventing /usr/sbin/apcupsd (deleted) from read access on the file LCK...

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

If you believe that apcupsd (deleted) should be allowed read access on the LCK.. 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 apcupsd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


Additional Information:
Source Context                system_u:system_r:apcupsd_t:s0
Target Context                system_u:object_r:var_lock_t:s0
Target Objects                LCK.. [ file ]
Source                        apcupsd
Source Path                   /usr/sbin/apcupsd (deleted)
Port                          <Unknown>
Host                          vfr
Source RPM Packages           apcupsd-3.14.10-7.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-82.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     vfr
Platform                      Linux vfr 3.8.1-201.fc18.x86_64 #1 SMP Thu Feb 28
                              19:23:08 UTC 2013 x86_64 x86_64
Alert Count                   6
First Seen                    2013-02-27 05:58:28 EST
Last Seen                     2013-03-04 20:34:47 EST
Local ID                      5f0e7e41-4a9e-495f-85b4-44b81bb9414f

Raw Audit Messages
type=AVC msg=audit(1362447287.904:770): avc:  denied  { read } for  pid=15947 comm="apcupsd" name="LCK.." dev="tmpfs" ino=18296 scontext=system_u:system_r:apcupsd_t:s0 tcontext=system_u:object_r:var_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1362447287.904:770): arch=x86_64 syscall=open success=no exit=EACCES a0=285a2cc a1=0 a2=285e2d8 a3=64 items=0 ppid=1 pid=15947 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=apcupsd exe=/usr/sbin/apcupsd subj=system_u:system_r:apcupsd_t:s0 key=(null)

Hash: apcupsd,apcupsd_t,var_lock_t,file,read

audit2allow

#============= apcupsd_t ==============
allow apcupsd_t var_lock_t:file read;

audit2allow -R

#============= apcupsd_t ==============
allow apcupsd_t var_lock_t:file read;

Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:
1. systemctl restart apcupsd.service
2.
3.
  
Actual results:

AVC

Expected results:

No AVC

Additional info:

selinux-policy-3.11.1-82.fc18.noarch
selinux-policy-targeted-3.11.1-82.fc18.noarch

Comment 1 Garry T. Williams 2013-03-11 01:24:37 UTC
After removing /run/lock/LCK.. and bouncing the apcupsd server, the error went away.  I don't know how the file got the wrong labeling.


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