[systemd-bugs] [Bug 62615] New: udev 198 labels files in /dev incorrectly on boot
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 21 14:30:02 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=62615
Priority: medium
Bug ID: 62615
Assignee: systemd-bugs at lists.freedesktop.org
Summary: udev 198 labels files in /dev incorrectly on boot
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: All
Reporter: amade at asmblr.net
Hardware: Other
Status: NEW
Version: unspecified
Component: general
Product: systemd
Created attachment 76878
--> https://bugs.freedesktop.org/attachment.cgi?id=76878&action=edit
output of diff a b
udev 198 doesn't label files in /dev correctly, some of them have correct
context while some do not.
ls -Z /dev > a
restorecon -R /dev
ls -Z /dev > b
diff a b
diff shows that a lot of files have wrong context
It seems to be caused by this commit:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=22582bb2cbe85b40de5f561589e0468dac769515
in particular by two lines from it:
- if (strcmp(udev_device_get_action(dev), "add") == 0) {
+ if (apply) {
After replacing apply with strcmp, all files are labeled correctly again
apply is passed via function calls with initial call in src/udev/udev-event.c
in function udev_event_execute_rules
udev_node_add(dev, event->owner_set || event->group_set || event->mode_set,
event->mode, event->uid, event->gid);
event->owner_set || event->group_set || event->mode_set evaluates to value of
apply
"udev_node_add" then calls passing apply "node_permissions_apply" which has "if
(apply) {" check
Reproducible: Always
( https://bugs.gentoo.org/show_bug.cgi?id=462538 )
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130321/c2191967/attachment.html>
More information about the systemd-bugs
mailing list