Subject: Re: kern/36661: any users can modify envsys setting
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Allen Briggs <briggs@netbsd.org>
List: netbsd-bugs
Date: 07/17/2007 15:20:04
The following reply was made to PR kern/36661; it has been noted by GNATS.
From: Allen Briggs <briggs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, yamt@mwd.biglobe.ne.jp
Subject: Re: kern/36661: any users can modify envsys setting
Date: Tue, 17 Jul 2007 11:19:46 -0400
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