Bug 179993
Summary: | udev ruleset not working for DVB devices anymore | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Peter Bieringer <pb> |
Component: | udev | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 4 | CC: | dedourek, ralston |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | FC5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-09-22 02:14:07 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Peter Bieringer
2006-02-04 11:46:35 UTC
You probably need the last_rule option. See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=179841#c2 Didn't help here, strange Next examples (from another system): KERNEL=="isdn*", MODE="0660" KERNEL=="isdnctrl*", MODE="0660" # ll /dev/isdnctrl* lrwxrwxrwx 1 root root 9 Feb 9 00:29 /dev/isdnctrl -> isdnctrl0 crw------- 1 root root 45, 64 Feb 9 00:29 /dev/isdnctrl0 crw------- 1 root root 45, 65 Feb 9 00:29 /dev/isdnctrl1 ... # ll /dev/isdn* crw------- 1 root root 45, 0 Feb 9 00:29 /dev/isdn0 crw------- 1 root root 45, 1 Feb 9 00:29 /dev/isdn1 crw------- 1 root root 45, 10 Feb 9 00:29 /dev/isdn10 Looks like now every dedicated rule needs OPTIONS="last_rule" - and hopefully works afterwards (can't test it currently for the ISDN devices) a short why-this-don't work test shows, that it looks like that all permissions in subdirectories in /dev/ are not proper set by udev. Looks like the subdirectory matcher is broken. Check e.g. # ll /dev/input/ total 0 crw------- 1 root root 13, 64 Feb 9 00:28 event0 crw------- 1 root root 13, 65 Feb 9 00:28 event1 crw------- 1 root root 13, 66 Feb 9 00:29 event2 crw------- 1 root root 13, 63 Feb 9 00:28 mice crw------- 1 root root 13, 32 Feb 9 00:28 mouse0 udev says: # input devices KERNEL=="input/*", MODE="0660" Well, this is what 50-udev.rules says: KERNEL="*", OWNER="root" GROUP="root", MODE="0600" KERNEL=="input/*", MODE="0660" KERNEL=="mice", NAME="input/%k" Before udev-071, the second rule would match /dev/input/mice after the third rule had been applied. But now, the second rule never matches. This smells like a bug to me. Consider these entries, also from 50-udev.rules: KERNEL="*", OWNER="root" GROUP="root", MODE="0600" KERNEL=="dri/*", MODE="0666" KERNEL=="card*", NAME="dri/card%n" At least for me, the second line *does* get applied in this case: $ ls -lsa /dev/dri total 0 0 drwxr-xr-x 2 root root 60 Feb 10 11:40 ./ 0 drwxr-xr-x 13 root root 3780 Feb 11 13:54 ../ 0 crw-rw-rw- 1 root root 226, 0 Feb 10 11:40 card0 Harald, can you shed any light on this? I got some time to play around with udev in debug mode and I *found* the reason and a solution: Current distributed by RPM: # grep dvb /etc/udev/rules.d/50-udev.rules KERNEL=="dvb/*", MODE="0660" KERNEL=="dvb", MODE="0660" KERNEL=="dvb/adapter*", MODE="0660" KERNEL=="dvb*", PROGRAM=="/etc/udev/scripts/dvb.sh %k", NAME="%c" First try, not working: KERNEL=="dvb/*", GROUP="video", MODE="0660" KERNEL=="dvb", GROUP="video", MODE="0660" KERNEL=="dvb/adapter[0-9]/*", GROUP="video", MODE="0660" Second try, *working* KERNEL=="dvb*", GROUP="video", MODE="0660" So it looks like behavior change in lookup was done. Prior update, the KERNEL== statements would be checked also after a NAME= run, now, this no longer works and the adjustments have to match the original entry before renaming (e.g. dvb0.frontend0 here). So all entries in rules file (this means all subdirectory entries) which are matching only the renamed devices need to be checked for proper working. BTW: udev debug log didn't log anything about owner, group, mode changes at all - that's not nice. Yes; that's what I meant in comment 4: the KERNEL key will never match the renamed device. I find it hard to believe that this isn't a bug. As far as I've been able to determine, one of the reasons why the KERNEL key would match the device as modified by the NAME key was so that you could have default owners/groups/permissions for classes of devices, rather than having to repeat them on every single line. But regardless: either this is a bug with udev, and the rules in 50-udev.rules are correct; or this is a intentional change in udev's behavior, and the rules in 50-udev.rules are now wrong. I changed severity to high to get more intention on this problem. Imho, if FC5 includes same udev new udev version, this would/should be a release-stopper until this is proper fixed and well documented. Ok, this should work on FC-5 and maybe with udev-071 on FC-4: # DVB KERNEL=="dvb", MODE="0660" SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660" Yes, this works, too. Closing bugs in MODIFIED state from prior Fedora releases. If this bug persists in a current Fedora release (such as Fedora Core 5 or later), please reopen and set the version appropriately. |