From owner-freebsd-stable@FreeBSD.ORG Wed Sep 17 06:21:32 2014 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27A07C39; Wed, 17 Sep 2014 06:21:32 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D73BCC35; Wed, 17 Sep 2014 06:21:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AC2D524800B; Wed, 17 Sep 2014 08:21:28 +0200 (CEST) Message-ID: <5419285D.8020909@selasky.org> Date: Wed, 17 Sep 2014 08:21:17 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Andriy Gapon , freebsd-stable List , FreeBSD Current Subject: Re: Fwd: usb printer vs cups References: <54133325.9070302@FreeBSD.org> <5419238E.8050708@FreeBSD.org> In-Reply-To: <5419238E.8050708@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------040608000705010201090203" Cc: freebsd-desktop@FreeBSD.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 06:21:32 -0000 This is a multi-part message in MIME format. --------------040608000705010201090203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 09/17/14 08:00, Andriy Gapon wrote: > > Soliciting help. > > -------- Forwarded Message -------- > >>From my experience I think that cupsd executes backend tools with all uids and > gids set to cups and no supplementary groups. In the case of USB printers the > backends need to access /dev/usbctl and /dev/usb/foobar that corresponds to a > printer. That means that the access to those devices must be somehow granted to > cups:cups. > How do people solve this? What kind of permissions / configuration do you use? > > P.S. > Maybe I over-generalized the issue to all USB printers. My personal experience > is with an HP printer handled by hplip / hplip-plugin. > Hi, The /usr/ports/print/cups-base should be updated. The pkg-message should not say that: # FreeBSD 8.x add path 'usb*' mode 0770 group cups add path 'ugen*' mode 0660 group cups add path 'usb/0.2.*' mode 0660 group cups Is needed. This is wrong. Instead make cups-base install the attached devd configuration file in /usr/local/etc/devd/ which does the needed chown for printers only. --HPS --------------040608000705010201090203 Content-Type: text/plain; charset=us-ascii; name="cups.conf.in" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cups.conf.in" # 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 "chown cups:cups /dev/$cdev"; }; --------------040608000705010201090203--