Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 317573 - sys-fs/udev-149: udev-postmount fails to populate /etc/udev/rules.d on hardened(selinux)
Summary: sys-fs/udev-149: udev-postmount fails to populate /etc/udev/rules.d on harden...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2010-04-28 04:06 UTC by Chris Richards
Modified: 2010-06-20 19:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Change udev-postmount testing behavior (udev-postmount.patch,283 bytes, patch)
2010-04-28 04:08 UTC, Chris Richards
Details | Diff
emerge --info (emerge-info,3.42 KB, text/plain)
2010-05-03 15:42 UTC, Chris Richards
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Richards 2010-04-28 04:06:38 UTC
/etc/init.d/udev-postmount with sys-fs/udev-149 fails to populate /etc/udev/rules.d when running under SELinux V2Ref policy, due to udev-postmount's attempt to create a subdirectory under the rules.d directory, when it only needs permissions (and has) permissions to create files.

Reproducible: Always

Steps to Reproduce:
1.  Load SElinux V2Ref policy
2.  Remove rules in /etc/udev/rules.d
3.  Reboot system

Actual Results:  
Rules not generated in /etc/udev/rules.d

Expected Results:  
Rules should be regenerated in /etc/udev/rules.d

The failure is due to the fact that the udev-postmount script tests its ability to write to the /etc/udev/rules.d directory by creating a DIRECTORY named test.$$ and then deleting the directory.  Under V2Ref policy, the init script only has permissions to create FILES, and in fact this is all the permission the init script actually needs.
Comment 1 Chris Richards 2010-04-28 04:08:10 UTC
Created attachment 229467 [details, diff]
Change udev-postmount testing behavior

This patch modifies udev-postmount so that it tests to see if it has permissions to create and delete files in the /etc/udev/rules.d directory, rather than trying to create and delete directories.
Comment 2 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-05-03 13:49:59 UTC
Please paste your emerge --info output, to see your profile.
Comment 3 Chris Richards 2010-05-03 15:42:43 UTC
Created attachment 230155 [details]
emerge --info
Comment 4 Matthias Schwarzott gentoo-dev 2010-06-20 19:28:10 UTC
Fixed on udev-156 and newer.
Thanks for providing a fix.