Bug 812023 - SELinux is preventing sh from 'getattr' accesses on the file /usr/bin/systemctl.
SELinux is preventing sh from 'getattr' accesses on the file /usr/bin/systemctl.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-12 10:50 EDT by Frank Murphy
Modified: 2012-04-18 18:51 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-3.10.0-114.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-18 18:51:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank Murphy 2012-04-12 10:50:50 EDT
libreport version: 2.0.10
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.1-5.fc17.i686
time:           Thu 12 Apr 2012 15:50:12 IST

:SELinux is preventing sh from 'getattr' accesses on the file /usr/bin/systemctl.
:*****  Plugin catchall (100. confidence) suggests  ***************************
:If you believe that sh should be allowed getattr access on the systemctl file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:allow this access for now by executing:
:# grep sh /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:Additional Information:
:Source Context                system_u:system_r:freshclam_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:systemd_systemctl_exec_t:s0
:Target Objects                /usr/bin/systemctl [ file ]
:Source                        sh
:Source Path                   sh
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           systemd-44-4.fc17.i686
:Policy RPM                    selinux-policy-3.10.0-110.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.1-5.fc17.i686 #1
:                              SMP Tue Apr 10 21:29:02 UTC 2012 i686 i686
:Alert Count                   1
:First Seen                    Thu 12 Apr 2012 15:18:30 IST
:Last Seen                     Thu 12 Apr 2012 15:18:30 IST
:Local ID                      84e7be04-2b0d-45a0-bcbc-3018b99de2bd
:Raw Audit Messages
:type=AVC msg=audit(1334240310.915:98): avc:  denied  { getattr } for  pid=13444 comm="sh" path="/usr/bin/systemctl" dev="vda3" ino=20457 scontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_systemctl_exec_t:s0 tclass=file
:Hash: sh,freshclam_t,systemd_systemctl_exec_t,file,getattr
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
Comment 1 Frank Murphy 2012-04-12 10:59:39 EDT
This is due to the following in /etc/freshclam.conf

 Send the RELOAD command to clamd.
# Default: no
NotifyClamd /etc/clamd.d/clamav.conf

# Run command after successful database update.
# Default: disabled
OnUpdateExecute systemctl reload clamd.clamav.service

both clamav booleans are allowed.
Comment 2 Fedora Update System 2012-04-13 04:41:43 EDT
selinux-policy-3.10.0-114.fc17 has been submitted as an update for Fedora 17.
Comment 3 Fedora Update System 2012-04-13 21:46:31 EDT
Package selinux-policy-3.10.0-114.fc17:
* should fix your issue,
* was pushed to the Fedora 17 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.10.0-114.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Frank Murphy 2012-04-14 04:10:24 EDT
Can this fix be ported to F18\Rawhide.
Comment 5 Miroslav Grepl 2012-04-16 04:16:01 EDT
This release has been pushed into updates-testing. This release should end up in Rawhide.
Comment 6 Fedora Update System 2012-04-18 18:51:16 EDT
selinux-policy-3.10.0-114.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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