Bug 584848 - selinux prevents devicekit_power_t from executing scripts under /etc/pm
Summary: selinux prevents devicekit_power_t from executing scripts under /etc/pm
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-22 14:57 UTC by Hans de Goede
Modified: 2010-04-28 03:06 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2010-04-28 03:06:54 UTC


Attachments (Terms of Use)

Description Hans de Goede 2010-04-22 14:57:56 UTC
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 15:51:01 UTC
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 16:32:33 UTC
(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 16:53:07 UTC
Yes I am adding bin_t to both.

Comment 4 Fedora Update System 2010-04-26 19:51:24 UTC
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 05:48:39 UTC
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-28 03:05:44 UTC
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.