Allow jailed proccesses to open non-process vnodes like the root of the fs.

This commit is contained in:
Poul-Henning Kamp 1999-07-09 21:31:44 +00:00
parent bdbc8c265e
commit 46dcdb370e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48719
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
* $Id: procfs_vnops.c,v 1.69 1999/06/13 20:53:16 phk Exp $
* $Id: procfs_vnops.c,v 1.70 1999/07/09 04:16:00 jlemon Exp $
*/
/*
@ -136,7 +136,7 @@ procfs_open(ap)
p2 = PFIND(pfs->pfs_pid);
if (p2 == NULL)
return (ENOENT);
if (!PRISON_CHECK(ap->a_p, p2))
if (pfs->pfs_pid && !PRISON_CHECK(ap->a_p, p2))
return (ENOENT);
switch (pfs->pfs_type) {

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95
*
* $Id: procfs_vnops.c,v 1.69 1999/06/13 20:53:16 phk Exp $
* $Id: procfs_vnops.c,v 1.70 1999/07/09 04:16:00 jlemon Exp $
*/
/*
@ -136,7 +136,7 @@ procfs_open(ap)
p2 = PFIND(pfs->pfs_pid);
if (p2 == NULL)
return (ENOENT);
if (!PRISON_CHECK(ap->a_p, p2))
if (pfs->pfs_pid && !PRISON_CHECK(ap->a_p, p2))
return (ENOENT);
switch (pfs->pfs_type) {