From nobody Tue Feb 21 07:28:31 2023 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PLW9W6cK1z3t9vX for ; Tue, 21 Feb 2023 07:28:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PLW9W50TNz3k1y for ; Tue, 21 Feb 2023 07:28:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676964511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKI9qN9F9bFOSSLrD4D1VpruZoHEoj/3B0KHJZB2KQ8=; b=AKmbqV6Tx6/0TRWfdb3WTG5mIctGtZEGk9XBvOGmdNbPB78MvQC+L4r7GAsvE4lkTp0Ca6 LR94HFe8TKOYiNUj+UPjQFEBSRvu6izSeCxk7P/DWigXgeAMDDk+b1uwt0hI+o+geoIqdr O+OHkvMsyPa+9koQY4drwJiZK7lBR/PoRW+t3rsGjCNHqalZsFO3Lf3loXSo9VU48wDX7k Ig/M8kO2DaWPUeOn7VBbHmy+qAuR4AC8RxN3wKnlOm5Fb36e9PbG+UAeaY9H7E0wsGIyBm ypaeA6KhI0yALg1D+Q4AZIu4+aQRg2qjDwV7RpmsMv63Inhwau6CDizIBu6oeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676964511; a=rsa-sha256; cv=none; b=xh+C5nEFI3mD/ZqO68IpsSayeZBjhe4572DA53/oDUsCOLI76CFYYPFXGtFam+LpbKJ0Gd cBsCl8VebOs3PNQhdowFP6dnhNX45ASHqChpqQDF4gY3svxY3kxvb+tomnGd6GtqF42YmL 5k7dEtxngC4li4fbpaxGOO5WbLo9kCSH15TBxYHez/sM7ROapgTCjGTX13IRJUSy6ItrgH 4HVXvDQxJ2gO2MQUgJIkJzYfRNti67ZxVeWz99eOmyhg7BFw0PhRxqo02GvlHKwoeWmrdn JljZQRYSx3TqzbBu5AKSlb1FZhJiR3RPlm3y5C6lURxtVZMOnIBk0ZKsVYl3gQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PLW9W44prz1CFP for ; Tue, 21 Feb 2023 07:28:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 31L7SVGU027496 for ; Tue, 21 Feb 2023 07:28:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 31L7SVhW027495 for ports-bugs@FreeBSD.org; Tue, 21 Feb 2023 07:28:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 269729] sysutils/nut USB permissions issue Date: Tue, 21 Feb 2023 07:28:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dennypage@me.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: cy@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269729 Bug ID: 269729 Summary: sysutils/nut USB permissions issue Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: cy@FreeBSD.org Reporter: dennypage@me.com Assignee: cy@FreeBSD.org Flags: maintainer-feedback?(cy@FreeBSD.org) I maintain the NUT package for pfSense and have run into an issue with USB permissions for some UPS models.=20 NB: My testing is against nut-2.8.0_13, but I haven't seen anything suggest= ing that the issue is resolved in later port revisions. The permission problem arrises from the fact that the kernel attaches a dri= ver to the device during initialization, and this subsequently prevents the dev= ice from being opened by usbhid-ups. The error reported is "Can't claim USB dev= ice" The following demonstrates the specifics: ----- [23.01-RELEASE][root@fw]/root: usbconfig -d ugen0.2 show_ifdrv ugen0.2: at usbus0, cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON (10mA) ugen0.2.0: uhid0: [23.01-RELEASE][root@fw]/root: /usr/local/libexec/nut/usbhid-ups -a ups Network UPS Tools - Generic HID driver 0.47 (2.8.0) USB communication driver (libusb 1.0) 0.43 interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of th= is message) Can't claim USB device [051d:0003]@0/0: Other error [23.01-RELEASE][root@fw]/root: usbconfig -d ugen0.2 detach_kernel_driver [23.01-RELEASE][root@fw]/root: usbconfig -d ugen0.2 show_ifdrv ugen0.2: at usbus0, cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON (10mA) [23.01-RELEASE][root@fw]/root: /usr/local/libexec/nut/usbhid-ups -a ups Network UPS Tools - Generic HID driver 0.47 (2.8.0) USB communication driver (libusb 1.0) 0.43 interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of th= is message) Using subdriver: APC HID 0.98 [23.01-RELEASE][root@fw]/root:=20 ----- As you would expect, if the "-u root" option is added to usbhid-ups then it will succeed even if the kernel driver is currently attached. I note that this permission issue is also present in the truss outputs in b= ug #267144 --=20 You are receiving this mail because: You are the assignee for the bug.=