A process should be able to examine itself.

This commit is contained in:
sef 1999-11-20 18:22:14 +00:00
parent c7d695c879
commit b5a0bd9494
2 changed files with 6 additions and 4 deletions

View File

@ -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) ? \

View File

@ -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) ? \