diff options
| author | elad <elad@NetBSD.org> | 2006-05-14 21:42:26 +0000 |
|---|---|---|
| committer | elad <elad@NetBSD.org> | 2006-05-14 21:42:26 +0000 |
| commit | 2867b68bc3d7cdb1bb7b9f8367e4aa0b2fa765f4 (patch) | |
| tree | a0add7b65b60ddf03960733156c82bfb90bc978d /sys/dev/cons.c | |
| parent | fc9422c9d9d5eec5abd0d58ae5fa47aedf2198e3 (diff) | |
integrate kauth.
Diffstat (limited to 'sys/dev/cons.c')
| -rw-r--r-- | sys/dev/cons.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/cons.c b/sys/dev/cons.c index 1512f1968ef..dbc0e60abaa 100644 --- a/sys/dev/cons.c +++ b/sys/dev/cons.c @@ -1,4 +1,4 @@ -/* $NetBSD: cons.c,v 1.57 2005/12/11 12:20:53 christos Exp $ */ +/* $NetBSD: cons.c,v 1.58 2006/05/14 21:42:26 elad Exp $ */ /* * Copyright (c) 1990, 1993 @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.57 2005/12/11 12:20:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.58 2006/05/14 21:42:26 elad Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -91,6 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.57 2005/12/11 12:20:53 christos Exp $"); #include <sys/file.h> #include <sys/conf.h> #include <sys/vnode.h> +#include <sys/kauth.h> #include <dev/cons.h> @@ -236,7 +237,7 @@ cnioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct lwp *l) * output from the "virtual" console. */ if (cmd == TIOCCONS && constty != NULL) { - error = suser(l->l_proc->p_ucred, (u_short *) NULL); + error = kauth_authorize_generic(l->l_proc->p_cred, KAUTH_GENERIC_ISSUSER, (u_short *) NULL); if (error) return (error); constty = NULL; |
