From e8d4364136a0d2cc0f977ca428fbae4b6468f4be Mon Sep 17 00:00:00 2001 From: millert Date: Sat, 16 Aug 1997 02:00:47 +0000 Subject: 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. --- sys/miscfs/procfs/procfs_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/miscfs/procfs/procfs_subr.c') 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); -- cgit v1.2.3-59-g8ed1b