]> err.no Git - systemd/commitdiff
rules: set group ownership of new firewire driver device files
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 1 Jul 2009 19:41:43 +0000 (21:41 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 1 Jul 2009 21:43:17 +0000 (23:43 +0200)
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 <stefanr@s5r6.in-berlin.de>
rules/rules.d/50-udev-default.rules

index f19fb63afbc4076e5be7c6e225829d73b8295796..fb8b1302c261a8e9a4d276ea2a065f9f8c21c76f 100644 (file)
@@ -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"