diff options
author | 1997-08-16 02:00:47 +0000 | |
---|---|---|
committer | 1997-08-16 02:00:47 +0000 | |
commit | e8d4364136a0d2cc0f977ca428fbae4b6468f4be (patch) | |
tree | ba91810dbf94f000f768d2f74afc34220a549c4d /sys/miscfs/procfs/procfs_subr.c | |
parent | Just some more debugging info. (diff) | |
download | wireguard-openbsd-e8d4364136a0d2cc0f977ca428fbae4b6468f4be.tar.xz wireguard-openbsd-e8d4364136a0d2cc0f977ca428fbae4b6468f4be.zip |
1) pfs_mode should be mode_t, not u_short
2) Fix procfs security hole. This is basically the NetBSD fix
(which is based in part on Sean Eric Fagan's FreeBSD fix)
with a few minor changes. The change creates as function,
procfs_checkioperm(), that has check numbers 3 and 4 from sys_ptrace().
3) Make procfs_control() use procfs_checkioperm() as well (it
already had the same basic checks but some of them were incorrect).
4) Minor stylistic cleanups, including the use of the SET/CLR/ISSET
macros to aid general grokability.
Diffstat (limited to 'sys/miscfs/procfs/procfs_subr.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index 42f527a97d3..2466afc1e8e 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_subr.c,v 1.7 1997/08/01 05:58:56 millert Exp $ */ +/* $OpenBSD: procfs_subr.c,v 1.8 1997/08/16 02:00:49 millert Exp $ */ /* $NetBSD: procfs_subr.c,v 1.15 1996/02/12 15:01:42 christos Exp $ */ /* @@ -113,7 +113,7 @@ loop: /* * otherwise lock the vp list while we call getnewvnode * since that can block. - */ + */ if (pfsvplock & PROCFS_LOCKED) { pfsvplock |= PROCFS_WANT; sleep((caddr_t) &pfsvplock, PINOD); |