diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-15 20:32:22 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-15 20:32:22 +0000 |
commit | a1ee01486d4d2da0dce2fd97a58ca548a402d598 (patch) | |
tree | eb06f4625b973fc701bb62d6902e4f1eb40bb4f2 /sys/dev/wscons | |
parent | 1a3299929d48eae52404e0b75267c111d07d2af4 (diff) |
change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsdisplay_compat_usl.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wskbd.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index 2c4b76ee8d0..9afc8297581 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay_compat_usl.c,v 1.13 2003/08/11 17:43:05 millert Exp $ */ +/* $OpenBSD: wsdisplay_compat_usl.c,v 1.14 2003/08/15 20:32:18 tedu Exp $ */ /* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -432,7 +432,7 @@ wsdisplay_usl_ioctl2(sc, scr, cmd, data, flag, p) return (0); case KDENABIO: - if (suser(p->p_ucred, &p->p_acflag) || securelevel > 1) + if (suser(p, 0) || securelevel > 1) return (EPERM); /* FALLTHRU */ case KDDISABIO: diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 1fcc522e611..c163ff838c7 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.35 2003/06/02 23:28:04 millert Exp $ */ +/* $OpenBSD: wskbd.c,v 1.36 2003/08/15 20:32:18 tedu Exp $ */ /* $NetBSD: wskbd.c,v 1.38 2000/03/23 07:01:47 thorpej Exp $ */ /* @@ -934,7 +934,7 @@ getbell: return (0); case WSKBDIO_SETDEFAULTBELL: - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p, 0)) != 0) return (error); kbdp = &wskbd_default_bell_data; goto setbell; @@ -977,7 +977,7 @@ getkeyrepeat: return (0); case WSKBDIO_SETDEFAULTKEYREPEAT: - if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) + if ((error = suser(p, 0)) != 0) return (error); kkdp = &wskbd_default_keyrepeat_data; goto setkeyrepeat; |