Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci lynxfb too.



details:   https://anonhg.NetBSD.org/src/rev/40c7730f4b61
branches:  trunk
changeset: 778052:40c7730f4b61
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Wed Mar 14 13:41:07 2012 +0000

description:
lynxfb too.

> Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
> something meaningful. All relevant documentation has been updated or
> written.

diffstat:

 sys/dev/pci/lynxfb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 5b3a92f93c6b -r 40c7730f4b61 sys/dev/pci/lynxfb.c
--- a/sys/dev/pci/lynxfb.c      Wed Mar 14 13:26:43 2012 +0000
+++ b/sys/dev/pci/lynxfb.c      Wed Mar 14 13:41:07 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $        */
+/*     $NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $        */
 /*     $OpenBSD: smfb.c,v 1.13 2011/07/21 20:36:12 miod Exp $  */
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.3 2012/03/11 15:58:56 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lynxfb.c,v 1.4 2012/03/14 13:41:07 nonaka Exp $");
 
 #include "opt_wsemul.h"
 
@@ -478,8 +478,8 @@
         * restrict all other mappings to processes with superuser privileges
         * or the kernel itself
         */
-       if (kauth_authorize_generic(kauth_cred_get(), KAUTH_GENERIC_ISSUSER,
-           NULL) != 0) {
+       if (kauth_authorize_machdep(kauth_cred_get(),
+           KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL) != 0) {
                aprint_normal_dev(sc->sc_dev, "mmap() rejected.\n");
                return (-1);
        }



Home | Main Index | Thread Index | Old Index