From owner-freebsd-hackers Fri Dec 1 12:56:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from orthanc.ab.ca (207-167-15-66.dsl.worldgate.ca [207.167.15.66]) by hub.freebsd.org (Postfix) with ESMTP id 58B3337B400; Fri, 1 Dec 2000 12:56:20 -0800 (PST) Received: from orthanc.ab.ca (localhost [127.0.0.1]) by orthanc.ab.ca (8.11.1/8.11.0.Beta3) with ESMTP id eB1KuDI32343; Fri, 1 Dec 2000 13:56:14 -0700 (MST) Message-Id: <200012012056.eB1KuDI32343@orthanc.ab.ca> To: hackers@freebsd.org, stable@freebsd.org Reply-To: hackers@freebsd.org Subject: PCIOCGETCONF/PCIOCREAD requires write permission? Organization: The Frobozz Magic Homing Pigeon Company Date: Fri, 01 Dec 2000 13:56:13 -0700 From: Lyndon Nerenberg Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Observed on 4.2-STABLE, but I've redirected replies to the hackers list.] 'pciconf -l' is documented to work for non-priv users, however the first thing the underlying ioctl code (pci_ioctl) does is bail with EPERM if the caller does not have /dev/pci open for write. Is there any reason why the FWRITE test cannot/should not be moved down into the 'case PCIOCWRITE' part of the switch? This would make both PCIOCGETCONF and PCIOCREAD work for readonly access to /dev/pci (which seems to me to be saner behaviour). --lyndon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message