Retain group kmem readability for P_SUGID processes.

This commit is contained in:
David Greenman 1995-04-15 02:50:13 +00:00
parent f62e09f22e
commit 5232af2cf1
2 changed files with 12 additions and 4 deletions

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94
*
* $Id: procfs_vnops.c,v 1.8 1995/02/03 06:46:20 davidg Exp $
* $Id: procfs_vnops.c,v 1.9 1995/04/15 02:30:17 davidg Exp $
*/
/*
@ -368,12 +368,16 @@ procfs_getattr(ap)
switch (pfs->pfs_type) {
case Pregs:
case Pfpregs:
case Pmem:
if (procp->p_flag & P_SUGID)
vap->va_mode &= ~((VREAD|VWRITE)|
((VREAD|VWRITE)>>3)|
((VREAD|VWRITE)>>6));
break;
case Pmem:
/* Retain group kmem readablity. */
if (procp->p_flag & P_SUGID)
vap->va_mode &= ~(VREAD|VWRITE);
break;
default:
break;
}

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vnops.c 8.6 (Berkeley) 2/7/94
*
* $Id: procfs_vnops.c,v 1.8 1995/02/03 06:46:20 davidg Exp $
* $Id: procfs_vnops.c,v 1.9 1995/04/15 02:30:17 davidg Exp $
*/
/*
@ -368,12 +368,16 @@ procfs_getattr(ap)
switch (pfs->pfs_type) {
case Pregs:
case Pfpregs:
case Pmem:
if (procp->p_flag & P_SUGID)
vap->va_mode &= ~((VREAD|VWRITE)|
((VREAD|VWRITE)>>3)|
((VREAD|VWRITE)>>6));
break;
case Pmem:
/* Retain group kmem readablity. */
if (procp->p_flag & P_SUGID)
vap->va_mode &= ~(VREAD|VWRITE);
break;
default:
break;
}