- Subject: [PATCH 2/2] rules: add ID_EXTERNAL_PORT and ID_MODEM
- From: Linus Walleij <linus.walleij@xxxxxxxxxx>
- Date: Thu, 14 Jul 2011 19:24:42 +0200
Distributions doing desktop spins or other single-user systems
may be interested in enabling access to the external ports (serial,
USB-to-serial dongle etc) and modems for the logged-in user.
To help with this, mark external serial ports with
ID_EXTERNAL_PORT and modems with ID_MODEM. This way a distributor
can create a 60-desktop-acl.rules (or similarly named) file like
this:
ENV{ID_EXTERNAL_PORT}=="*?", TAG+="udev-acl"
ENV{ID_MODEM}=="*?", TAG+="udev-acl"
To enable local access to external ports and modems on these
specific distributions.
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
rules/rules.d/50-udev-default.rules | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
index 7684ea9..2ad08e9 100644
--- a/rules/rules.d/50-udev-default.rules
+++ b/rules/rules.d/50-udev-default.rules
@@ -9,16 +9,16 @@ KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty"
# external serial ports - these may or may not be connected to modems,
# we assume they are connected to modems for security reasons
-KERNEL=="tty[A-Z]*[0-9]|ircomm[0-9]*", GROUP="dialout"
+KERNEL=="tty[A-Z]*[0-9]|ircomm[0-9]*", GROUP="dialout", ENV{ID_EXTERNAL_PORT}="1"
# bluetooth TTY links - not always possible to use for dialout but we
# assume so anyway for security reasons
-KERNEL=="rfcomm[0-9]*", GROUP="dialout"
+KERNEL=="rfcomm[0-9]*", GROUP="dialout", ENV{ID_EXTERNAL_PORT}="1"
# modems
-KERNEL=="pppox[0-9]*|noz[0-9]*", GROUP="dialout"
-KERNEL=="mwave", GROUP="dialout"
-KERNEL=="hvc*|hvsi*", GROUP="dialout"
+KERNEL=="pppox[0-9]*|noz[0-9]*", GROUP="dialout", ENV{ID_MODEM}="1"
+KERNEL=="mwave", GROUP="dialout", ENV{ID_MODEM}="1"
+KERNEL=="hvc*|hvsi*", GROUP="dialout", ENV{ID_MODEM}="1"
# virtio serial / console ports
KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux DVB]
[Video Technology]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Util Linux NG]
[Xfree86]
[Devices]
[Fedora Women]
[ALSA Devel]
[Linux USB]