Annotation of /trunk/udev/udev-acl.rules.magellan
Parent Directory | Revision Log
Revision 1124 -
(hide annotations)
(download)
Mon Sep 13 14:05:04 2010 UTC (14 years ago) by niro
File size: 3014 byte(s)
Mon Sep 13 14:05:04 2010 UTC (14 years ago) by niro
File size: 3014 byte(s)
-merged with upstream udev-162 rules
1 | niro | 888 | # /etc/udev/rules/70-acl.rules: device naming rules for udev |
2 | niro | 1088 | # $Header: /root/magellan-cvs/src/udev/udev-acl.rules.magellan,v 1.3 2010-08-18 02:24:12 niro Exp $ |
3 | niro | 888 | # |
4 | # There are a number of modifiers that are allowed to be used in some | ||
5 | # of the different fields. They provide the following subsitutions: | ||
6 | # %n - the "kernel number" of the device. | ||
7 | # For example, 'sda3' has a "kernel number" of '3' | ||
8 | # %k - the kernel name for the device. | ||
9 | # %M - the kernel major number for the device | ||
10 | # %m - the kernel minor number for the device | ||
11 | # %b - the bus id for the device | ||
12 | # %c - the string returned by the PROGRAM. (Note, this doesn't work within | ||
13 | # the PROGRAM field for the obvious reason.) | ||
14 | # %s{filename} - the content of a sysfs attribute. | ||
15 | # %% - the '%' char itself. | ||
16 | # | ||
17 | # Try not to modify this file, if you wish to change things, create a new rule | ||
18 | # file that can be run before this one. | ||
19 | # | ||
20 | |||
21 | niro | 1088 | # Do not use TAG+="udev-acl" outside of this file. This variable is private to |
22 | # udev-acl of this udev release and may be replaced at any time. | ||
23 | |||
24 | niro | 888 | ENV{MAJOR}=="", GOTO="acl_end" |
25 | niro | 1088 | ACTION=="remove", GOTO="acl_apply" |
26 | niro | 888 | |
27 | # PTP/MTP protocol devices, cameras, portable media players | ||
28 | SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p" | ||
29 | niro | 1088 | SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="udev-acl" |
30 | niro | 888 | |
31 | # digicams with proprietary protocol | ||
32 | niro | 1088 | ENV{ID_GPHOTO2}=="*?", TAG+="udev-acl" |
33 | niro | 888 | |
34 | niro | 1124 | # SCSI and USB scanners |
35 | niro | 1088 | ENV{libsane_matched}=="yes", TAG+="udev-acl" |
36 | niro | 888 | |
37 | # HPLIP devices (necessary for ink level check and HP tool maintenance) | ||
38 | niro | 1088 | ENV{ID_HPLIP}=="1", TAG+="udev-acl" |
39 | niro | 888 | |
40 | # optical drives | ||
41 | niro | 1088 | SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="udev-acl" |
42 | niro | 888 | |
43 | # sound devices | ||
44 | niro | 1088 | SUBSYSTEM=="sound", TAG+="udev-acl" |
45 | niro | 888 | # sound jack-sense |
46 | niro | 1088 | SUBSYSTEM=="input", SUBSYSTEMS=="sound", TAG+="udev-acl" |
47 | niro | 888 | |
48 | # webcams, frame grabber, TV cards | ||
49 | niro | 1088 | SUBSYSTEM=="video4linux", TAG+="udev-acl" |
50 | SUBSYSTEM=="dvb", TAG+="udev-acl" | ||
51 | niro | 888 | |
52 | niro | 1016 | # IIDC devices: industrial cameras and some webcams |
53 | niro | 1088 | SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG+="udev-acl" |
54 | SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", TAG+="udev-acl" | ||
55 | niro | 1016 | # AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more |
56 | niro | 1088 | SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="udev-acl" |
57 | SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="udev-acl" | ||
58 | niro | 1016 | |
59 | niro | 888 | # DRI video devices |
60 | niro | 1088 | SUBSYSTEM=="drm", KERNEL=="card*", TAG+="udev-acl" |
61 | niro | 888 | |
62 | # KVM | ||
63 | niro | 1088 | SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="udev-acl" |
64 | niro | 888 | |
65 | # smart-card readers | ||
66 | niro | 1088 | ENV{ID_SMARTCARD_READER}=="*?", TAG+="udev-acl" |
67 | niro | 888 | |
68 | # joysticks | ||
69 | niro | 1088 | SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="udev-acl" |
70 | niro | 888 | |
71 | niro | 1016 | # color measurement devices |
72 | niro | 1088 | ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="udev-acl" |
73 | niro | 1016 | |
74 | niro | 1088 | # DDC/CI device, usually high-end monitors such as the DreamColor |
75 | ENV{DDC_DEVICE}=="*?", TAG+="udev-acl" | ||
76 | |||
77 | niro | 888 | # apply ACL for all locally logged in users |
78 | niro | 1088 | LABEL="acl_apply", TAG=="udev-acl", TEST=="/var/run/ConsoleKit/database", \ |
79 | niro | 888 | RUN+="udev-acl --action=$env{ACTION} --device=$env{DEVNAME}" |
80 | |||
81 | LABEL="acl_end" |