Bug 710743 - SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the lnk_file /var/lock.
Summary: SELinux is preventing /bin/systemd-tmpfiles from 'read' accesses on the lnk_f...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:e19e0515c77...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-04 13:02 UTC by vikram goyal
Modified: 2011-06-17 14:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-06 12:33:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description vikram goyal 2011-06-04 13:02:36 UTC
SELinux is preventing /bin/systemd-tmpfiles 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 systemd-tmpfiles 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: proc_net_t, var_run_t, rpm_var_lib_t, home_root_t, var_lock_t, cert_t, device_t, devlog_t, locale_t, var_auth_t, abrt_t, etc_t, lib_t, lockfile, root_t, device_t, ld_so_t, proc_t, textrel_shlib_t, systemd_tmpfiles_t, rpm_script_tmp_t, var_run_t, rpm_var_cache_t, cert_t, var_run_t, var_run_t, var_run_t. 
Then execute: 
restorecon -v '/var/lock'


*****  Plugin catchall (1.44 confidence) suggests  ***************************

If you believe that systemd-tmpfiles 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 systemd-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                system_u:object_r:var_t:s0
Target Objects                /var/lock [ lnk_file ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-26-2.fc15
Target RPM Packages           filesystem-2.4.41-1.fc15
Policy RPM                    selinux-policy-3.9.16-26.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux f15host.f15domain 2.6.38.6-27.fc15.i686.PAE
                              #1 SMP Sun May 15 17:39:47 UTC 2011 i686 i686
Alert Count                   23
First Seen                    Sat 28 May 2011 05:41:02 PM IST
Last Seen                     Sat 04 Jun 2011 06:26:04 PM IST
Local ID                      a8618817-ebfb-4a16-b11d-3f4bee8c3a9b

Raw Audit Messages
type=AVC msg=audit(1307192164.802:70): avc:  denied  { read } for  pid=2568 comm="systemd-tmpfile" name="lock" dev=dm-1 ino=1050126 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=lnk_file


type=SYSCALL msg=audit(1307192164.802:70): arch=i386 syscall=open success=yes exit=EINTR a0=9359d18 a1=98800 a2=92df640 a3=64a2e6d2 items=0 ppid=1 pid=2568 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,var_t,lnk_file,read

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t var_t:lnk_file read;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t var_t:lnk_file read;

Comment 1 Dominick Grift 2011-06-04 14:30:40 UTC
restorecon -R -v /var should fix it

Comment 2 Jan Pazdziora 2011-06-17 14:14:32 UTC
Is this a dupe of bug 701575?

Comment 3 Dominick Grift 2011-06-17 14:19:21 UTC
Yes pretty much looks like it


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