1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Add pfs_visible() checks to pfs_getattr() and pfs_getextattr(). This

also fixes pfs_access() since it relies on VOP_GETATTR() which will call
pfs_getattr().  This prevents jailed processes from discovering the
existence, start time and ownership of processes outside the jail.

PR:		kern/48156
This commit is contained in:
Dag-Erling Smørgrav 2003-08-19 10:26:41 +00:00
parent 98b8dc587d
commit 134ce0f9cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119122

View File

@ -163,6 +163,9 @@ pfs_getattr(struct vop_getattr_args *va)
PFS_TRACE((pn->pn_name));
if (!pfs_visible(curthread, pn, pvd->pvd_pid))
PFS_RETURN (ENOENT);
VATTR_NULL(vap);
vap->va_type = vn->v_type;
vap->va_fileid = pn->pn_fileno;
@ -263,6 +266,9 @@ pfs_getextattr(struct vop_getextattr_args *va)
PFS_TRACE((pd->pn_name));
if (!pfs_visible(curthread, pn, pvd->pvd_pid))
PFS_RETURN (ENOENT);
if (pn->pn_getextattr == NULL)
PFS_RETURN (EOPNOTSUPP);