summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-09-04 17:12:28 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2009-09-04 17:12:28 +0200
commitf61e72d8973cf9d889a4f1233150870085c0b3e1 (patch)
tree956300c0c7e7e73c11daf2f69a19af1865eabb6b /rules
parent6d691b2bd669ea0bb3472a7a7d86780dd351977f (diff)
make raw USB printer devices accessible for lp
Starting from version 1.4, cups now uses libusb and printer USB devices instead of the usblp generated /dev/usb/lpX ones. In order to not require the cups USB backend to run as root now, change raw USB printer devices to be root:lp 0660, similar to usblpX devices. This might also enable the hplip backend to not run as root, since this has always used raw device nodes. https://launchpad.net/bugs/420015
Diffstat (limited to 'rules')
-rw-r--r--rules/rules.d/50-udev-default.rules4
1 files changed, 4 insertions, 0 deletions
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
index 2507420b2c..4e9a73751e 100644
--- a/rules/rules.d/50-udev-default.rules
+++ b/rules/rules.d/50-udev-default.rules
@@ -60,6 +60,10 @@ SUBSYSTEM=="ppdev", GROUP="lp"
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
KERNEL=="lp[0-9]*", GROUP="lp"
KERNEL=="irlpt[0-9]*", GROUP="lp"
+# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
+# the ones from the old usblp kernel module
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
+SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"
# block
SUBSYSTEM=="block", GROUP="disk"