diff options
author | sef <sef@FreeBSD.org> | 1999-11-20 18:22:14 +0000 |
---|---|---|
committer | sef <sef@FreeBSD.org> | 1999-11-20 18:22:14 +0000 |
commit | b5a0bd94943cb40715dd37850d2199cac15a880f (patch) | |
tree | 089d63378ea2f5d37f0a8ccacf370a26cae65105 /sys | |
parent | c7d695c87955ea458fd46fe22aa5dd21ef1a8f5e (diff) | |
download | FreeBSD-src-b5a0bd94943cb40715dd37850d2199cac15a880f.zip FreeBSD-src-b5a0bd94943cb40715dd37850d2199cac15a880f.tar.gz |
A process should be able to examine itself.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/procfs/procfs.h | 5 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs.h | 5 |
2 files changed, 6 insertions, 4 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) ? \ diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h index 07c6da2..f5547ee 100644 --- a/sys/miscfs/procfs/procfs.h +++ b/sys/miscfs/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) ? \ |