summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1999-11-20 18:22:14 +0000
committersef <sef@FreeBSD.org>1999-11-20 18:22:14 +0000
commitb5a0bd94943cb40715dd37850d2199cac15a880f (patch)
tree089d63378ea2f5d37f0a8ccacf370a26cae65105 /sys/fs
parentc7d695c87955ea458fd46fe22aa5dd21ef1a8f5e (diff)
downloadFreeBSD-src-b5a0bd94943cb40715dd37850d2199cac15a880f.zip
FreeBSD-src-b5a0bd94943cb40715dd37850d2199cac15a880f.tar.gz
A process should be able to examine itself.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs.h b/sys/fs/procfs/procfs.h
index 07c6da2..f5547ee 100644
--- a/sys/fs/procfs/procfs.h
+++ b/sys/fs/procfs/procfs.h
@@ -95,12 +95,13 @@ struct pfsnode {
* Evaluates to 1 if access is allowed.
*/
#define CHECKIO(p1, p2) \
- (PRISON_CHECK(p1, p2) && \
+ ((p1) == (p2) || \
+ (PRISON_CHECK(p1, p2) && \
((((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_xxx(0, (p1), PRISON_ROOT) == 0)))
+ (suser_xxx(0, (p1), PRISON_ROOT) == 0))))
#define PROCFS_FILENO(pid, type) \
(((type) < Pproc) ? \
OpenPOWER on IntegriCloud