From: Stefan Richter Date: Wed, 1 Jul 2009 19:41:43 +0000 (+0200) Subject: rules: set group ownership of new firewire driver device files X-Git-Tag: 174~918 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0fb82d821a9b1c078d98fb283f20ee359d756ab;p=systemd rules: set group ownership of new firewire driver device files The newer firewire-core driver exposes per-device character device files, called /dev/fw[0-9]*, in contrast to the older raw1394, video1394, dv1394 drivers which created one global file or per-controller files. This allows to set ownership, permissions, or/ and access control lists for each device file based on device type markers obtained from sysfs. The "units" attribute which is used for this purpose has become available in Linux 2.6.31(-rc1) by commit 0210b66dd88a2a1e451901b00378a2068b6ccb35. The added rules match identifiers of - IIDC devices: industrial cameras and some webcams, - AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and similar devices. Signed-off-by: Stefan Richter --- diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules index f19fb63a..fb8b1302 100644 --- a/rules/rules.d/50-udev-default.rules +++ b/rules/rules.d/50-udev-default.rules @@ -43,9 +43,12 @@ SUBSYSTEM=="drm", GROUP="video" # DVB (video) SUBSYSTEM=="dvb", ENV{DVB_ADAPTER_NUM}=="?*", NAME="dvb/adapter$env{DVB_ADAPTER_NUM}/$env{DVB_DEVICE_TYPE}$env{DVB_DEVICE_NUM}", GROUP="video" -# Firewire +# FireWire (dv1394 and video1394 drivers) KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n", GROUP="video" KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video" +# FireWire (firewire-core driver: IIDC devices, AV/C devices) +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video" # libusb device nodes SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0664"