Bug 874109 - SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the directory systemd-namespace-xLYhDn.
Summary: SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the direc...
Keywords:
Status: CLOSED DUPLICATE of bug 826010
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c91a3c15f2882437a5b3cf9d350...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-07 14:26 UTC by Jeff Layton
Modified: 2014-06-18 07:42 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-19 13:48:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-11-07 14:26 UTC, Jeff Layton
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-11-07 14:26 UTC, Jeff Layton
no flags Details

Description Jeff Layton 2012-11-07 14:26:05 UTC
Description of problem:
Not exactly sure. I think tmpwatch just ended up running via cron.daily. It looks like systemd is putting some stuff in /tmp and changing the selinux label on it. It seems like tmpwatch ought to either skip those files or be allowed to deal with them.

OTOH, maybe systemd ought to be putting these things elsewhere? No idea what the right fix is...


Additional info:
libreport version: 2.0.18
kernel:         3.6.5-2.fc18.x86_64

description:
:SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the directory systemd-namespace-xLYhDn.
:
:*****  Plugin file (36.8 confidence) suggests  *******************************
:
:If you think this is caused by a badly mislabeled machine.
:Then you need to fully relabel.
:Do
:touch /.autorelabel; reboot
:
:*****  Plugin file (36.8 confidence) suggests  *******************************
:
:If you think this is caused by a badly mislabeled machine.
:Then you need to fully relabel.
:Do
:touch /.autorelabel; reboot
:
:*****  Plugin catchall_labels (23.2 confidence) suggests  ********************
:
:If you want to allow tmpwatch to have setattr access on the systemd-namespace-xLYhDn directory
:Then you need to change the label on systemd-namespace-xLYhDn
:Do
:# semanage fcontext -a -t FILE_TYPE 'systemd-namespace-xLYhDn'
:where FILE_TYPE is one of the following: sandbox_file_t, kismet_log_t, rpm_var_cache_t, httpd_cache_t, user_home_type, print_spool_t, amavis_spool_t, man_t, usr_t, mandb_cache_t, tmpfile. 
:Then execute: 
:restorecon -v 'systemd-namespace-xLYhDn'
:
:
:*****  Plugin catchall (5.04 confidence) suggests  ***************************
:
:If you believe that tmpwatch should be allowed setattr access on the systemd-namespace-xLYhDn directory 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 tmpwatch /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:tmpreaper_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:file_t:s0
:Target Objects                systemd-namespace-xLYhDn [ dir ]
:Source                        tmpwatch
:Source Path                   /usr/sbin/tmpwatch
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           tmpwatch-2.11-2.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-46.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.5-2.fc18.x86_64 #1 SMP Thu Nov
:                              1 00:39:17 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    2012-11-07 06:31:12 EST
:Last Seen                     2012-11-07 06:31:12 EST
:Local ID                      ed76975e-7f1c-4df7-91ee-61549169130c
:
:Raw Audit Messages
:type=AVC msg=audit(1352287872.867:170): avc:  denied  { setattr } for  pid=5825 comm="tmpwatch" name="systemd-namespace-xLYhDn" dev="dm-2" ino=8429762 scontext=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1352287872.867:170): arch=x86_64 syscall=utime success=no exit=EACCES a0=404923 a1=7fff3b2b8820 a2=1f1 a3=35727b1798 items=0 ppid=5823 pid=5825 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=6 comm=tmpwatch exe=/usr/sbin/tmpwatch subj=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 key=(null)
:
:Hash: tmpwatch,tmpreaper_t,file_t,dir,setattr
:
:audit2allow
:
:#============= tmpreaper_t ==============
:allow tmpreaper_t file_t:dir setattr;
:
:audit2allow -R
:
:#============= tmpreaper_t ==============
:allow tmpreaper_t file_t:dir setattr;
:


Potential duplicate bug: 826010

Comment 1 Jeff Layton 2012-11-07 14:26:08 UTC
Created attachment 640096 [details]
File: type

Comment 2 Jeff Layton 2012-11-07 14:26:10 UTC
Created attachment 640097 [details]
File: hashmarkername

Comment 3 Jeff Layton 2012-11-19 12:16:56 UTC
I suppose tmpwatch just ran via cron...

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 4 Miroslav Grepl 2012-11-19 13:48:01 UTC

*** This bug has been marked as a duplicate of bug 826010 ***


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