From 8902608d574e2ccb980adda6b9799d004576a561 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 4 May 1999 08:00:10 +0000 Subject: [PATCH] Add even more () to CHECKIO which by now feels positively LISPish. Submitted by: bde Reviewed by: phk --- sys/fs/procfs/procfs.h | 7 ++++--- sys/miscfs/procfs/procfs.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/fs/procfs/procfs.h b/sys/fs/procfs/procfs.h index 0c2698a77d4..b758d0683a2 100644 --- a/sys/fs/procfs/procfs.h +++ b/sys/fs/procfs/procfs.h @@ -37,7 +37,7 @@ * @(#)procfs.h 8.9 (Berkeley) 5/14/95 * * From: - * $Id: procfs.h,v 1.23 1999/04/28 11:37:18 phk Exp $ + * $Id: procfs.h,v 1.24 1999/04/30 13:04:20 phk Exp $ */ /* @@ -94,10 +94,11 @@ struct pfsnode { */ #define CHECKIO(p1, p2) \ (PRISON_CHECK(p1, p2) && \ - (((p1)->p_cred->pc_ucred->cr_uid == (p2)->p_cred->p_ruid) && \ + ((((p1)->p_cred->pc_ucred->cr_uid == (p2)->p_cred->p_ruid) && \ ((p1)->p_cred->p_ruid == (p2)->p_cred->p_ruid) && \ ((p1)->p_cred->p_svuid == (p2)->p_cred->p_ruid) && \ - ((p2)->p_flag & P_SUGID) == 0) || (suser((p1)) == 0)) + ((p2)->p_flag & P_SUGID) == 0) || \ + (suser_xxx(0, (p1), PRISON_ROOT) == 0))) /* * Format of a directory entry in /proc, ... diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h index 0c2698a77d4..b758d0683a2 100644 --- a/sys/miscfs/procfs/procfs.h +++ b/sys/miscfs/procfs/procfs.h @@ -37,7 +37,7 @@ * @(#)procfs.h 8.9 (Berkeley) 5/14/95 * * From: - * $Id: procfs.h,v 1.23 1999/04/28 11:37:18 phk Exp $ + * $Id: procfs.h,v 1.24 1999/04/30 13:04:20 phk Exp $ */ /* @@ -94,10 +94,11 @@ struct pfsnode { */ #define CHECKIO(p1, p2) \ (PRISON_CHECK(p1, p2) && \ - (((p1)->p_cred->pc_ucred->cr_uid == (p2)->p_cred->p_ruid) && \ + ((((p1)->p_cred->pc_ucred->cr_uid == (p2)->p_cred->p_ruid) && \ ((p1)->p_cred->p_ruid == (p2)->p_cred->p_ruid) && \ ((p1)->p_cred->p_svuid == (p2)->p_cred->p_ruid) && \ - ((p2)->p_flag & P_SUGID) == 0) || (suser((p1)) == 0)) + ((p2)->p_flag & P_SUGID) == 0) || \ + (suser_xxx(0, (p1), PRISON_ROOT) == 0))) /* * Format of a directory entry in /proc, ...