updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / udev-ubuntu / cups-hplip-fix.patch
blob0bac4abe18f4d4b961991513962c14f1e5310122
1 From: Martin Pitt <martin.pitt@ubuntu.com>
2 Date: Fri, 4 Sep 2009 15:12:28 +0000 (+0200)
3 Subject: make raw USB printer devices accessible for lp
4 X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f61e72d8973cf9d889a4f1233150870085c0b3e1
6 make raw USB printer devices accessible for lp
8 Starting from version 1.4, cups now uses libusb and printer USB devices instead
9 of the usblp generated /dev/usb/lpX ones. In order to not require the cups USB
10 backend to run as root now, change raw USB printer devices to be root:lp 0660,
11 similar to usblpX devices.
13 This might also enable the hplip backend to not run as root, since this has
14 always used raw device nodes.
16 https://launchpad.net/bugs/420015
17 ---
19 diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
20 index 2507420..4e9a737 100644
21 --- a/rules/rules.d/50-udev-default.rules
22 +++ b/rules/rules.d/50-udev-default.rules
23 @@ -60,6 +60,10 @@ SUBSYSTEM=="ppdev", GROUP="lp"
24 SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
25 KERNEL=="lp[0-9]*", GROUP="lp"
26 KERNEL=="irlpt[0-9]*", GROUP="lp"
27 +# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
28 +# the ones from the old usblp kernel module
29 +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
30 +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"
32 # block
33 SUBSYSTEM=="block", GROUP="disk"