tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Removal of some KAUTH_GENERIC_ISSUSER (pass 1)



On Sat, Apr 11, 2009 at 02:12:41PM +0300, Elad Efrat wrote:
> Sorry, forgot about gmail's little issue:
> 
> http://www.netbsd.org/~elad/diff/pass1.diff

Hmm. cmos(4) access should always have been controlled by the device
node permissions, I think?

Index: sys/arch/i386/isa/cmos.c
===================================================================
RCS file: /usr/cvs/src/sys/arch/i386/isa/cmos.c,v
retrieving revision 1.6
diff -u -p -r1.6 cmos.c
--- sys/arch/i386/isa/cmos.c    28 Jun 2008 15:09:49 -0000      1.6
+++ sys/arch/i386/isa/cmos.c    10 Apr 2009 22:40:45 -0000
@@ -118,8 +118,8 @@ int
 cmos_open(dev_t dev, int flags, int ifmt, struct lwp *l)
 {
 
-       return kauth_authorize_generic(kauth_cred_get(),
-           KAUTH_GENERIC_ISSUSER, NULL);
+       return kauth_authorize_machdep(kauth_cred_get(),
+           KAUTH_MACHDEP_NVRAM, NULL, NULL, NULL, NULL);
 }
 
 static void

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index