From cfea6a110635318354adbbb38f645ff43a13c089 Mon Sep 17 00:00:00 2001 From: tijl Date: Mon, 14 Mar 2016 11:40:58 +0000 Subject: 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 [1] --- print/cups/files/cups.conf.sample | 13 +++++++++++++ print/cups/files/patch-backend_usb-libusb.c | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 print/cups/files/cups.conf.sample create mode 100644 print/cups/files/patch-backend_usb-libusb.c (limited to 'print/cups/files') 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) -- cgit