summaryrefslogtreecommitdiff
path: root/extras/udev-acl/70-acl.rules
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-06-16 17:43:12 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-06-16 17:43:12 +0200
commitaf23b83ea714756aa4bfed7f7501739c69428e40 (patch)
tree1347ff8887b1b5de937a901b70fb25654f536b71 /extras/udev-acl/70-acl.rules
parent1a669a701914badc6ecbeb29eb2cab1e17d0994b (diff)
udev-acl: move from udev-extras
The build of extras with larger external dependencies is wrapped in: --enable-extras
Diffstat (limited to 'extras/udev-acl/70-acl.rules')
-rw-r--r--extras/udev-acl/70-acl.rules45
1 files changed, 45 insertions, 0 deletions
diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules
new file mode 100644
index 0000000000..fc27039597
--- /dev/null
+++ b/extras/udev-acl/70-acl.rules
@@ -0,0 +1,45 @@
+# do not edit this file, it will be overwritten on update
+
+ENV{MAJOR}=="", GOTO="acl_end"
+ACTION!="add|change", GOTO="acl_apply"
+
+# PTP/MTP protocol devices, cameras, portable media players
+SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p"
+SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ACL_MANAGE}="1"
+
+# digicams with proprietary protocol
+ENV{ID_GPHOTO2}=="*?", ENV{ACL_MANAGE}="1"
+
+# SCSI scanners
+KERNEL=="sg[0-9]*", ATTRS{type}=="6", ENV{ACL_MANAGE}="1"
+KERNEL=="sg[0-9]*", ATTRS{type}=="3", ATTRS{vendor}=="HP|EPSON|Epson", ENV{ACL_MANAGE}="1"
+
+# USB scanners
+ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1"
+
+# optical drives
+SUBSYSTEM=="block", ENV{ID_CDROM}=="1", ENV{ACL_MANAGE}="1"
+
+# sound devices
+SUBSYSTEM=="sound", ENV{ACL_MANAGE}="1"
+# sound jack-sense
+SUBSYSTEM=="input", SUBSYSTEMS=="sound", ENV{ACL_MANAGE}="1"
+
+# webcams, frame grabber, TV cards
+SUBSYSTEM=="video4linux", ENV{ACL_MANAGE}="1"
+SUBSYSTEM=="dvb", ENV{ACL_MANAGE}="1"
+
+# fingerprint readers
+SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="2016", ENV{ACL_MANAGE}="1"
+
+# DRI video devices
+SUBSYSTEM=="drm", KERNEL=="card*", ENV{ACL_MANAGE}="1"
+
+# KVM
+SUBSYSTEM=="misc", KERNEL=="kvm", ENV{ACL_MANAGE}="1"
+
+# apply ACL for all locally logged in users
+LABEL="acl_apply", ENV{ACL_MANAGE}=="?*", TEST=="/var/run/ConsoleKit/database", \
+ RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}"
+
+LABEL="acl_end"