Bug 758571

Summary: system_cronjob_t needs to be able to check network status
Product: [Fedora] Fedora Reporter: Dax Kelson <dkelson>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.9.16-50.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-17 20:25:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dax Kelson 2011-11-30 05:53:39 UTC
Description of problem:

I have a backup shell script that runs from cron.hourly that checks to see if there is a wired connection before backing up using this command:

if (nmcli -t -f TYPE,STATE dev status | grep -q 802-3-ethernet:connected); then

   # other checks and then do backup

fi

It used to work fine in Fedora 14, but in Fedora 15 it stopped working with the following error message:

type=USER_AVC msg=audit(1322631859.266:290): user pid=886 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.105 spid=865 tpid=5713 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tclass=dbus : exe="/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

I had to create this local module:

require {
	type NetworkManager_t;
	type system_cronjob_t;
	class dbus send_msg;
}

allow NetworkManager_t system_cronjob_t:dbus send_msg;

Can the stock policy please allow this or have a boolean?

Comment 1 Miroslav Grepl 2011-11-30 11:03:49 UTC
Added to selinux-policy-3.9.16-49.fc15

Comment 2 Fedora Update System 2011-12-14 13:39:47 UTC
selinux-policy-3.9.16-50.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-50.fc15

Comment 3 Fedora Update System 2011-12-14 23:29:46 UTC
Package selinux-policy-3.9.16-50.fc15:
* should fix your issue,
* was pushed to the Fedora 15 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.9.16-50.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-17089/selinux-policy-3.9.16-50.fc15
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-01-17 20:25:18 UTC
selinux-policy-3.9.16-50.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.