Bug 584848 - selinux prevents devicekit_power_t from executing scripts under /etc/pm
selinux prevents devicekit_power_t from executing scripts under /etc/pm
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-22 10:57 EDT by Hans de Goede
Modified: 2010-04-27 23:06 EDT (History)
0 users

See Also:
Fixed In Version: selinux-policy-3.7.19-6.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-27 23:06:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2010-04-22 10:57:56 EDT
I need a custom script to unload / reload my wlan driver across suspend / resume.

This script lives under /etc/pm/sleep.d (note there are other dirs under /etc/pm which can contain scripts too).

selinux is preventing the execution of this script:
type=1400 audit(1271944981.141:5): avc:  denied  { execute } for  pid=1394 comm="pm-suspend" name="89-p54pci.sh" dev=sda1 ino=790256 scontext=system_u:system_r:devicekit_power_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file
Comment 1 Daniel Walsh 2010-04-22 11:51:01 EDT
chcon -R -t bin_t /etc/pm/power.d

Should fix for now.

Fixed in selinux-policy-3.7.19-5.fc13.noarch
Comment 2 Hans de Goede 2010-04-22 12:32:33 EDT
(In reply to comment #1)
> chcon -R -t bin_t /etc/pm/power.d
> 
> Should fix for now.

That should be:
chcon -R -t bin_t /etc/pm/sleep.d

In my case, I hope the new rules do apply to both:
/etc/pm/power.d
and:
/etc/pm/sleep.d

Thanks for the quick fix and the work around.

Regards,

Hans
Comment 3 Daniel Walsh 2010-04-22 12:53:07 EDT
Yes I am adding bin_t to both.
Comment 4 Fedora Update System 2010-04-26 15:51:24 EDT
selinux-policy-3.7.19-6.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-6.fc13
Comment 5 Fedora Update System 2010-04-27 01:48:39 EDT
selinux-policy-3.7.19-6.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-6.fc13
Comment 6 Fedora Update System 2010-04-27 23:05:44 EDT
selinux-policy-3.7.19-6.fc13 has been pushed to the Fedora 13 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.