Subject: Re: Addition to force open to open only regular files
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: tech-kern
Date: 11/15/2000 22:49:33
On Wed, Nov 15, 2000 at 08:35:37PM -0500, Greg A. Woods wrote:
> Of course if a privileged process read()s, or worse write()s, to a file
> accidentally then there can be real problems, be it a device or not!
	So write() is bad and read() is bad, but not as much.  Saying that
open() must be ok is needlessly limiting what behavior a device can
be defined to do on open (and implicitly, on close).  Opening a device
can do various things: allocating memory, setting flags, changing
hardware state, generally using system resources.  I do not believe that
it is broken to allow devices to do things like this.  I also think that
if the permissions on the device node forbid a particular user from accessing
the device they should not be able to cause the system to use those
resources.

> feature.  I haven't knowingly used $HOSTALIASES in nearly a dozen years
> and I've certainly never missed it, so perhaps it should be just ripped
> out completely.  Certainly a set-id program should blatantly ignore it.
	just because you don't use a feature doesn't mean no one else should.

eric