Subject: Re: kern/36661: any users can modify envsys setting
To: None <gnats-bugs@NetBSD.org>
From: Allen Briggs <briggs@netbsd.org>
List: netbsd-bugs
Date: 07/17/2007 11:19:46
On Tue, Jul 17, 2007 at 03:10:04PM +0000, Juan RP wrote:
>  > >Fix:
>  > 	- make sysmonioctl_envsys check FWRITE for ENVSYS_SETDICTIONARY.
>  > 	- make envstat(8) use O_WDWR when appropriate.
>  
>  I asked that two months ago when I started it. Nobody answered me if
>  envstat -m should be used only by root or something like this.

I'm sorry no one answered.  I don't know about root-only, but it
makes sense for the "set" operations to be governed by write access
to the device.  That is consistent with the BSD/*nix model.

Reading should be governed by read (FREAD) access to the device,
modifying/setting/writing should be governed by write (FWRITE)
access.

-allen

-- 
Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs@ninthwonder.com