From owner-freebsd-current Tue Nov 19 1:42: 1 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A005F37B401 for ; Tue, 19 Nov 2002 01:41:59 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE3C243E77 for ; Tue, 19 Nov 2002 01:41:58 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gAJ9fUbq017310; Tue, 19 Nov 2002 10:41:35 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Kris Kennaway Cc: kip@eventdriven.org, Bruce Evans , current@FreeBSD.ORG Subject: Re: Device permissions with DEVFS In-Reply-To: Your message of "Tue, 19 Nov 2002 00:27:58 PST." <20021119082758.GA3738@rot13.obsecurity.org> Date: Tue, 19 Nov 2002 10:41:30 +0100 Message-ID: <17309.1037698890@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021119082758.GA3738@rot13.obsecurity.org>, Kris Kennaway writes: > >On Tue, Nov 19, 2002 at 12:16:49AM -0800, Kip Macy wrote: >> This doesn't sound like an intrinsic limitation of >> devfs, just an issue with how it is structured now. s/structured/used by drivers/ >> There should just be a central file for all the=20 >> devices which devfs sucks in at build (or maybe boot)=20 >> time specifying the appropriate permissions and any >> other configuration information. > >No, the default permissions are specified in the driver source code >via make_dev(). I guess one cannot be trapped in an airport for more than 24 hours before people start fighting over ones code :-) A major design-goal of DEVFS is to avoid that or more central files have to know about all device drivers. Adding a new such file is not acceptable. On the other hand, knowing special UID and GID values in the kernel is quite a hack as well. IMO, the current situation is a fair compromise: 1. (+) We do not need MAKEDEV anymore. 2. (-) For some time yet we will still need majors. 3. (-) We embed magic UID and GID values in the kernel to make /dev come up with the most sensible defaults. 4. (+) The devfs(8) facility allows people to override these defaults in a race-free manner. In addition it allows the user to define entirely new and wonderful policies. Summary: Don't expect changes in DEVFS, but do put pressure on driver authors to get sensible defaults used. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message