From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 11 00:13:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17188106566B for ; Sun, 11 Jan 2009 00:13:58 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id CC9DE8FC08 for ; Sun, 11 Jan 2009 00:13:57 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id n0B0Dv6P026813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Jan 2009 16:13:57 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id n0B0DvTO026812; Sat, 10 Jan 2009 16:13:57 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA02896; Sat, 10 Jan 09 16:08:32 PST Date: Sat, 10 Jan 2009 16:10:42 -0800 From: perryh@pluto.rain.com To: uspoerlein@gmail.com Message-Id: <49693902.0x2OQspLPLnuQLwg%perryh@pluto.rain.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> <20090109204014.GA83381@keira.kiwi-computer.com> <496892aa.n9QVqyhWypsSmeIU%perryh@pluto.rain.com> <20090110185135.GB83079@roadrunner.spoerlein.net> In-Reply-To: <20090110185135.GB83079@roadrunner.spoerlein.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2009 00:13:58 -0000 Ulrich Spoerlein wrote: > I cannot really comment on the devfs(4) design issues, > and quite frankly it hasn't bothered my thus far. It evidently inconvenienced the OP. > Just another little quirk you get to remember. If we followed that line of reasoning to its logical conclusion we would eliminate POLA entirely. > > IMO it violates POLA, if not POSIX, for open(2) to succeed when > > applied to a name which, according to readdir(2), does not > > exist; and it is suboptimal to have "stealth" drivers whose > > availability for use cannot be discovered by examining /dev. > > You forgot directories with --x permissions. You can open many > files inside them, but readdir(2) will get you nowhere. So this > is a poor standard by which to judge devfs(4) device cloning. There are at least two problems with that analysis: * /dev does not ordinarily have --x permissions. Even if I amended the principle to allow for that case, it would not affect its application to this case. * readdir works for root, even in directories with --x permissions. For example: $ mkdir test $ touch test/file $ ls -la test total 4 drwxr-xr-x 2 perryh perryh 512 Jan 10 15:39 . drwxr-xr-x 3 perryh perryh 512 Jan 10 15:39 .. -rw-r--r-- 1 perryh perryh 0 Jan 10 15:39 file $ chmod 111 test $ ls -ld test d--x--x--x 2 perryh perryh 512 Jan 10 15:39 test $ ls -la test total 0 ls: test: Permission denied # ls -la test total 4 d--x--x--x 2 perryh perryh 512 Jan 10 15:39 . drwxr-xr-x 3 perryh perryh 512 Jan 10 15:39 .. -rw-r--r-- 1 perryh perryh 0 Jan 10 15:39 file