Bug 875402

Summary: SELinux is preventing systemd-tmpfile from 'setattr' accesses on the directory /var/cache/man.
Product: [Fedora] Fedora Reporter: Eric Blake <eblake>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: decathorpe, dominick.grift, dwalsh, jnovy, mgrepl, mikhail.v.gavrilov, nicolas.mailhot, xaver, xurzwi2q1
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:c6354e53958dab6be635a5dbe3491e0489c4722c3a0568c92c525b2faa891f21
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-07 04:28:50 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername
none
screenshot alert none

Description Eric Blake 2012-11-11 00:41:04 UTC
Additional info:
libreport version: 2.0.16
kernel:         3.6.2-2.fc18.i686.PAE

description:
:SELinux is preventing systemd-tmpfile from 'setattr' accesses on the directory /var/cache/man.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that systemd-tmpfile should be allowed setattr access on the man 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 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:mandb_cache_t:s0
:Target Objects                /var/cache/man [ dir ]
:Source                        systemd-tmpfile
:Source Path                   systemd-tmpfile
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           man-db-2.6.2-5.fc18.i686
:Policy RPM                    selinux-policy-3.11.1-36.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.2-2.fc18.i686.PAE #1 SMP Wed
:                              Oct 17 06:15:29 UTC 2012 i686 i686
:Alert Count                   65
:First Seen                    2012-11-10 17:35:10 MST
:Last Seen                     2012-11-10 17:35:53 MST
:Local ID                      3ce9fea5-b2e6-4273-b9f8-db56059a01fc
:
:Raw Audit Messages
:type=AVC msg=audit(1352594153.580:416): avc:  denied  { setattr } for  pid=3044 comm="systemd-tmpfile" name="man" dev="vda2" ino=276019 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:mandb_cache_t:s0 tclass=dir
:
:
:Hash: systemd-tmpfile,systemd_tmpfiles_t,mandb_cache_t,dir,setattr
:
:audit2allow
:
:#============= systemd_tmpfiles_t ==============
:allow systemd_tmpfiles_t mandb_cache_t:dir setattr;
:
:audit2allow -R
:
:#============= systemd_tmpfiles_t ==============
:allow systemd_tmpfiles_t mandb_cache_t:dir setattr;
:

Comment 1 Eric Blake 2012-11-11 00:41:07 UTC
Created attachment 642505 [details]
File: type

Comment 2 Eric Blake 2012-11-11 00:41:08 UTC
Created attachment 642506 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-12 13:38:55 UTC
Please update the policy packages. It has been already fixed.

Comment 4 Mikhail 2012-12-03 03:16:49 UTC
Still occurs for me.

$ rpm -q selinux-policy
selinux-policy-3.11.1-59.fc18.noarch

Comment 5 Mikhail 2012-12-03 03:18:01 UTC
Created attachment 656345 [details]
screenshot alert

Comment 6 Miroslav Grepl 2012-12-03 10:12:38 UTC
*** Bug 882384 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Grepl 2012-12-03 10:17:50 UTC
Added.

commit 6d7e740e07815a13ee505186a626596c47a72f6d
Author: Miroslav Grepl <mgrepl>
Date:   Mon Dec 3 11:15:01 2012 +0100

    Allow systemd_tmpfiles_t to setattr on mandb_cache_t

Comment 8 Fedora Update System 2012-12-06 10:12:45 UTC
selinux-policy-3.11.1-60.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18

Comment 9 Fedora Update System 2012-12-06 20:09:37 UTC
Package selinux-policy-3.11.1-60.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-60.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19374/selinux-policy-3.11.1-60.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-12-07 04:28:52 UTC
selinux-policy-3.11.1-60.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.