Bug 1178004

Summary: SELinux is preventing logrotate from 'add_name' accesses on the directory hawkey.log-20150101.
Product: [Fedora] Fedora Reporter: Fabio Valentini <decathorpe>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:61907732423c9ac818bc71836f66177017dfc8bc64457a9f75595bbe2c65dd46
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-02 12:58:03 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:

Description Fabio Valentini 2015-01-01 10:21:22 UTC
Description of problem:
SELinux is preventing logrotate from 'add_name' accesses on the directory hawkey.log-20150101.

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

If you believe that logrotate should be allowed add_name access on the hawkey.log-20150101 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 logrotate /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:rpm_var_cache_t:s0
Target Objects                hawkey.log-20150101 [ dir ]
Source                        logrotate
Source Path                   logrotate
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-103.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.17.7-300.fc21.x86_64 #1 SMP Wed
                              Dec 17 03:08:44 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2015-01-01 11:18:01 CET
Last Seen                     2015-01-01 11:18:01 CET
Local ID                      f73a46e5-8584-48c2-b9ac-44743b858e19

Raw Audit Messages
type=AVC msg=audit(1420107481.469:660): avc:  denied  { add_name } for  pid=8149 comm="logrotate" name="hawkey.log-20150101" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:rpm_var_cache_t:s0 tclass=dir permissive=1


Hash: logrotate,logrotate_t,rpm_var_cache_t,dir,add_name

Version-Release number of selected component:
selinux-policy-3.13.1-103.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.7-300.fc21.x86_64
type:           libreport

Comment 1 Daniel Walsh 2015-01-02 12:58:03 UTC

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