Bug 903703 - udev: device node permissions not applied with "change" event
Summary: udev: device node permissions not applied with "change" event
Keywords:
Status: CLOSED DUPLICATE of bug 903716
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 18
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 15:45 UTC by Peter Rajnoha
Modified: 2013-01-24 16:36 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-01-24 16:36:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lgos with ENV rule used (10.00 KB, application/x-bzip)
2013-01-24 15:46 UTC, Peter Rajnoha
no flags Details
logs with KERNEL rule used (10.00 KB, application/x-bzip)
2013-01-24 15:46 UTC, Peter Rajnoha
no flags Details

Description Peter Rajnoha 2013-01-24 15:45:22 UTC
Description of problem:
There's something wrong with applying permission udev rules (OWNER, GROUP, MODE) when these rules are applied conditionally based on an ENV rule. Even if the ENV variable is set and passes the condition used, the permissions are not applied.

How reproducible:
For example, by creating permission /etc/udev/rules.d/12-dm-permissions.rules:

(with ENV)
ENV{DM_NAME}=="mydev", OWNER:="peter", GROUP:="peter", MODE:="660"
LABEL="dm_end"

(with KERNEL)
KERNEL=="dm-*", OWNER:="peter", GROUP:="peter", MODE:="660"

In the former case with the "ENV" rule used, the permissions are not applied even though ENV{DM_NAME}=="mydev" exists (and which is set in 10-dm.rules).

In the latter case with the "KERNEL" rule used, the permissions are correctly applied. So this seems to be a problem with processing the ENV rule.

Attaching full logs:

(with ENV)
logs_with_env_used.tar.bz2

(with KERNEL)
logs_with_kernel_used.tar.bz2

Additional info:
Based on the logs, it seems the rule to set permissions while using the ENV comparison is correctly recognized for application though it's not applied,
as the udevd log says:

set permissions /dev/dm-73, 060660, uid=0, gid=6
...
OWNER 1000 /etc/udev/rules.d/12-dm-permissions.rules:1
GROUP 1000 /etc/udev/rules.d/12-dm-permissions.rules:1

Version:
systemd-197-1.fc18.1.x86_64

Comment 1 Peter Rajnoha 2013-01-24 15:46:29 UTC
Created attachment 686828 [details]
lgos with ENV rule used

Comment 2 Peter Rajnoha 2013-01-24 15:46:48 UTC
Created attachment 686829 [details]
logs with KERNEL rule used

Comment 3 Kay Sievers 2013-01-24 16:22:08 UTC
Recent udev versions only set the device node permissions and selinux context
with "add" and never later.

We need to find some fix here ...

Comment 4 Kay Sievers 2013-01-24 16:36:06 UTC

*** This bug has been marked as a duplicate of bug 903716 ***


Note You need to log in before you can comment on or make changes to this bug.