Bug 755420

Summary: SELinux is preventing /usr/sbin/acpid from 'read' accesses on the lnk_file /var/lock.
Product: [Fedora] Fedora Reporter: bob brush <bob>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:4af00eebc212e74f34ee6274d5b56a08c34b9d1b33af7a86986692b357bd3d23
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-23 15:26:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description bob brush 2011-11-21 05:15:02 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.1.1-2.fc16.i686.PAE
reason:         SELinux is preventing /usr/sbin/acpid from 'read' accesses on the lnk_file /var/lock.
time:           Mon Nov 21 00:13:14 2011

description:
:SELinux is preventing /usr/sbin/acpid from 'read' accesses on the lnk_file /var/lock.
:
:*****  Plugin restorecon (94.8 confidence) suggests  *************************
:
:If you want to fix the label. 
:/var/lock default label should be var_lock_t.
:Then you can run restorecon.
:Do
:# /sbin/restorecon -v /var/lock
:
:*****  Plugin catchall_labels (5.21 confidence) suggests  ********************
:
:If you want to allow acpid to have read access on the lock lnk_file
:Then you need to change the label on /var/lock
:Do
:# semanage fcontext -a -t FILE_TYPE '/var/lock'
:where FILE_TYPE is one of the following: udev_var_run_t, exec_type, var_run_t, modules_conf_t, textrel_shlib_t, rpm_script_tmp_t, cgroup_t, var_lock_t, apmd_t, bin_t, init_t, lib_t, device_t, devlog_t, hwdata_t, locale_t, var_run_t, var_run_t, udev_t, etc_t, ld_so_t, proc_t, sysfs_t, cert_t, etc_t, var_run_t, domain, mta_exec_type, abrt_t, lib_t, device_t, device_t, root_t, etc_runtime_t, ld_so_t, proc_t, var_run_t, var_run_t, cgroup_t, init_t, init_t. 
:Then execute: 
:restorecon -v '/var/lock'
:
:
:*****  Plugin catchall (1.44 confidence) suggests  ***************************
:
:If you believe that acpid should be allowed read access on the lock lnk_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 acpid /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:apmd_t:s0
:Target Context                system_u:object_r:var_t:s0
:Target Objects                /var/lock [ lnk_file ]
:Source                        acpid
:Source Path                   /usr/sbin/acpid
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           acpid-2.0.11-1.fc16
:Target RPM Packages           filesystem-2.4.44-1.fc16
:Policy RPM                    selinux-policy-3.10.0-55.fc16
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed)
:                              3.1.1-2.fc16.i686.PAE #1 SMP Mon Nov 14 15:57:20
:                              UTC 2011 i686 i686
:Alert Count                   2
:First Seen                    Mon 21 Nov 2011 12:10:45 AM EST
:Last Seen                     Mon 21 Nov 2011 12:12:42 AM EST
:Local ID                      5183f1b5-09cc-47e5-97b1-5029c17c952e
:
:Raw Audit Messages
:type=AVC msg=audit(1321852362.47:85): avc:  denied  { read } for  pid=1101 comm="acpid" name="lock" dev=dm-2 ino=1836277 scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=lnk_file
:
:
:type=SYSCALL msg=audit(1321852362.47:85): arch=i386 syscall=stat64 success=no exit=EACCES a0=6da56a a1=bff57e60 a2=a5fff4 a3=3 items=0 ppid=1 pid=1101 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=acpid exe=/usr/sbin/acpid subj=system_u:system_r:apmd_t:s0 key=(null)
:
:Hash: acpid,apmd_t,var_t,lnk_file,read
:
:audit2allow
:
:#============= apmd_t ==============
:allow apmd_t var_t:lnk_file read;
:
:audit2allow -R
:
:#============= apmd_t ==============
:allow apmd_t var_t:lnk_file read;
:

Comment 1 Miroslav Grepl 2011-11-21 12:19:14 UTC
Please execute

# restorecon -R -v /var/lock

should fix the problem.

Did you upgrade from F15? Or is this a fresh install?