chiark / gitweb /
fc270395970e3f977cffd74fbc29b0c6c3a6a5a4
[elogind.git] / extras / udev-acl / 70-acl.rules
1 # do not edit this file, it will be overwritten on update
2
3 ENV{MAJOR}=="", GOTO="acl_end"
4 ACTION!="add|change", GOTO="acl_apply"
5
6 # PTP/MTP protocol devices, cameras, portable media players
7 SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p"
8 SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ACL_MANAGE}="1"
9
10 # digicams with proprietary protocol
11 ENV{ID_GPHOTO2}=="*?", ENV{ACL_MANAGE}="1"
12
13 # SCSI scanners
14 KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{ACL_MANAGE}="1"
15 KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", ENV{ACL_MANAGE}="1"
16
17 # USB scanners
18 ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1"
19
20 # optical drives
21 SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="1"
22
23 # sound devices
24 SUBSYSTEM=="sound", ENV{ACL_MANAGE}="1"
25 # sound jack-sense
26 SUBSYSTEM=="input", SUBSYSTEMS=="sound", ENV{ACL_MANAGE}="1"
27
28 # webcams, frame grabber, TV cards
29 SUBSYSTEM=="video4linux", ENV{ACL_MANAGE}="1"
30 SUBSYSTEM=="dvb", ENV{ACL_MANAGE}="1"
31
32 # fingerprint readers
33 SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", ENV{ACL_MANAGE}="1"
34
35 # DRI video devices
36 SUBSYSTEM=="drm", KERNEL=="card*", ENV{ACL_MANAGE}="1"
37
38 # KVM
39 SUBSYSTEM=="misc", KERNEL=="kvm", ENV{ACL_MANAGE}="1"
40
41 # apply ACL for all locally logged in users
42 LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \
43   RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
44
45 LABEL="acl_end"