diff options
author | tijl <tijl@FreeBSD.org> | 2016-03-14 19:40:58 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2016-03-14 19:40:58 +0800 |
commit | cfea6a110635318354adbbb38f645ff43a13c089 (patch) | |
tree | 30a636739db5565ee1f6b228496e2a2ad23deca3 /print/cups/files | |
parent | 34788e6887920b99efacdeb7bf82f8a3f6a43cc3 (diff) | |
download | freebsd-ports-graphics-cfea6a110635318354adbbb38f645ff43a13c089.tar.gz freebsd-ports-graphics-cfea6a110635318354adbbb38f645ff43a13c089.tar.zst freebsd-ports-graphics-cfea6a110635318354adbbb38f645ff43a13c089.zip |
Add a patch to print/cups and print/hplip to disable detaching of ulpt(4).
This isn't needed on FreeBSD and it always fails because the process doesn't
have the required privileges.
Add a sample devd configuration file to print/cups that gives users in group
cups access to USB printers. [1]
Submitted by: hselasky, Alexander Zagrebin <alex@zagrebin.ru> [1]
Diffstat (limited to 'print/cups/files')
-rw-r--r-- | print/cups/files/cups.conf.sample | 13 | ||||
-rw-r--r-- | print/cups/files/patch-backend_usb-libusb.c | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/print/cups/files/cups.conf.sample b/print/cups/files/cups.conf.sample new file mode 100644 index 00000000000..7eaca84e564 --- /dev/null +++ b/print/cups/files/cups.conf.sample @@ -0,0 +1,13 @@ +# $FreeBSD$ +# +# Allow members of group cups to access generic USB printer devices + +notify 100 { + match "system" "USB"; + match "subsystem" "INTERFACE"; + match "type" "ATTACH"; + match "intclass" "0x07"; + match "intsubclass" "0x01"; + match "intprotocol" "(0x01|0x02|0x03)"; + action "chgrp cups /dev/$cdev; chmod g+rw /dev/$cdev"; +}; diff --git a/print/cups/files/patch-backend_usb-libusb.c b/print/cups/files/patch-backend_usb-libusb.c new file mode 100644 index 00000000000..22bc56d78cc --- /dev/null +++ b/print/cups/files/patch-backend_usb-libusb.c @@ -0,0 +1,11 @@ +--- backend/usb-libusb.c.orig 2015-09-15 21:20:02 UTC ++++ backend/usb-libusb.c +@@ -1441,7 +1441,7 @@ open_device(usb_printer_t *printer, /* I + * works without the module attached. + */ + +- errcode = libusb_kernel_driver_active(printer->handle, printer->iface); ++ errcode = 0; + if (errcode == 0) + printer->usblp_attached = 0; + else if (errcode == 1) |