Am Samstag, den 21.08.2010, 22:25 +0200 schrieb Marco d'Itri:
> s/ENV{ACL_MANAGE}!="1"/TAG!="udev-acl"/
Did you test this? I tried that, but it didn't work here. I have changed
70-acl.rules like this for diagnosing:
$ cat /lib/udev/rules.d/70-acl.rules
[...]
LABEL="acl_apply"
TAG=="udev-acl", RUN+="/usr/bin/logger udev-acl TAG is set"
TAG!="udev-acl", RUN+="/usr/bin/logger Skipping ACL section",
GOTO="acl_end"
# Glib is not declared as a package dependency, so check that it is
actually
# installed before running udev-acl.
TEST!="/lib/libglib-2.0.so.0", GOTO="acl_end"
# apply ACL for all locally logged in users
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
LABEL="acl_end"
My syslog looks like this when I plug in my USB sound card:
Aug 21 22:50:11 localhost kernel: [336176.548011] usb 2-5: new full
speed USB device using ohci_hcd and address 121
Aug 21 22:50:12 localhost kernel: [336176.753946] usb 2-5: New USB
device found, idVendor=0d8c, idProduct=000c
Aug 21 22:50:12 localhost kernel: [336176.753950] usb 2-5: New USB
device strings: Mfr=0, Product=1, SerialNumber=0
Aug 21 22:50:12 localhost kernel: [336176.753954] usb 2-5: Product:
C-Media USB Headphone Set
Aug 21 22:50:12 localhost kernel: [336176.754066] usb 2-5:
configuration #1 chosen from 1 choice
Aug 21 22:50:12 localhost kernel: [336176.991017] input: C-Media USB
Headphone Set as
/devices/pci0000:00/0000:00:0b.0/usb2/2-5/2-5:1.3/input/input128
Aug 21 22:50:12 localhost kernel: [336176.991108] generic-usb
0003:0D8C:000C.007C: input,hidraw3: USB HID v1.00 Device [C-Media USB Headphone
Set ] on usb-0000:00:0b.0-5/input3
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: udev-acl TAG is set
Aug 21 22:50:12 localhost logger: Skipping ACL section
Aug 21 22:50:12 localhost logger: Skipping ACL section
And the permissions are still not right:
$ getfacl /dev/mixer1
getfacl: Removing leading '/' from absolute path names
# file: dev/mixer1
# owner: root
# group: audio
user::rw-
group::rw-
other::---
So it seems like the positive matching (a==b) for TAG seems to work, but
the negative matching (a!=b) doesn't. Strange world of udev rules.
Additionally, please don't forget that there are packages which use
ACL_MANAGE, for example gnome-bluetooth and the nvidia drivers, see my
initial mail.
So in total I think that my original patch is the only thing which
actually works and doesn't break anything.
Thanks for your work, it is greatly appreciated!
Alexander Kurtz
signature.asc
Description: This is a digitally signed message part

