Bug 981998 - SELinux is preventing /usr/bin/ovs-appctl from 'write' accesses on the file ovs-vswitchd.pid.
Summary: SELinux is preventing /usr/bin/ovs-appctl from 'write' accesses on the file o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:cca00114e8fd169bf891974842e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-07 16:19 UTC by Ian Pilcher
Modified: 2013-07-14 03:39 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.12.1-63.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-14 03:39:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Pilcher 2013-07-07 16:19:44 UTC
Description of problem:
SELinux is preventing /usr/bin/ovs-appctl from 'write' accesses on the file ovs-vswitchd.pid.

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

If you believe that ovs-appctl should be allowed write access on the ovs-vswitchd.pid 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 ovs-appctl /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                system_u:object_r:openvswitch_var_run_t:s0
Target Objects                ovs-vswitchd.pid [ file ]
Source                        ovs-appctl
Source Path                   /usr/bin/ovs-appctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openvswitch-1.10.0-2.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-59.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-301.fc19.x86_64 #1 SMP Thu
                              Jul 4 15:10:36 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-07-07 03:11:04 CDT
Last Seen                     2013-07-07 03:11:04 CDT
Local ID                      a01c115d-7195-4d6a-995b-435fe52aef00

Raw Audit Messages
type=AVC msg=audit(1373184664.592:186): avc:  denied  { write } for  pid=11044 comm="ovs-appctl" name="ovs-vswitchd.pid" dev="tmpfs" ino=15055 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:openvswitch_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1373184664.592:186): arch=x86_64 syscall=open success=no exit=EACCES a0=7fc4a4798080 a1=2 a2=1b6 a3=c items=0 ppid=11041 pid=11044 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=10 tty=(none) comm=ovs-appctl exe=/usr/bin/ovs-appctl subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)

Hash: ovs-appctl,logrotate_t,openvswitch_var_run_t,file,write

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 902438

Comment 1 Ian Pilcher 2013-07-07 16:23:04 UTC
This looks to be logwatch/logrotate-related.

Comment 2 Ian Pilcher 2013-07-07 16:39:02 UTC
It's logrotate:

/etc/cron.daily/logrotate:

2013-07-07T08:11:04Z|00001|daemon|WARN|/var/run/openvswitch/ovsdb-server.pid: open: Permission denied
ovs-appctl: cannot read pidfile "/var/run/openvswitch/ovsdb-server.pid" (Permission denied)
2013-07-07T08:11:04Z|00001|daemon|WARN|/var/run/openvswitch/ovs-vswitchd.pid: open: Permission denied
ovs-appctl: cannot read pidfile "/var/run/openvswitch/ovs-vswitchd.pid" (Permission denied)
error: error running shared postrotate script for '/var/log/openvswitch/*.log '

Comment 3 Daniel Walsh 2013-07-08 22:48:13 UTC
chcon -t openvswitch_exec_t /usr/bin/ovs-appctl

Should fix this problem for now.

Comment 4 Fedora Update System 2013-07-11 08:58:40 UTC
selinux-policy-3.12.1-63.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-63.fc19

Comment 5 Fedora Update System 2013-07-12 02:58:11 UTC
Package selinux-policy-3.12.1-63.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-63.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12762/selinux-policy-3.12.1-63.fc19
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-07-14 03:39:40 UTC
selinux-policy-3.12.1-63.fc19 has been pushed to the Fedora 19 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.