From 90376d10b0f4f691b5bd0c7028cbbc1dd3a758db Mon Sep 17 00:00:00 2001 From: rwatson Date: Fri, 3 Aug 2001 17:20:34 +0000 Subject: Collapse a Pmem case in with the other debugging files case for procfs, as there are now "unusual" protection properties to Pmem that differ from the other files. While I'm at it, introduce proc locking for the other files, which was previously present only in the Pmem case. Obtained from: TrustedBSD Project --- sys/fs/procfs/procfs_vnops.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/fs') diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index 9efe6d66..206f3e5 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -449,15 +449,12 @@ procfs_getattr(ap) case Pregs: case Pfpregs: case Pdbregs: + case Pmem: + PROC_LOCK(procp); if (procp->p_flag & P_SUGID) vap->va_mode &= ~((VREAD|VWRITE)| ((VREAD|VWRITE)>>3)| ((VREAD|VWRITE)>>6)); - break; - case Pmem: - PROC_LOCK(procp); - if (procp->p_flag & P_SUGID) - vap->va_mode &= ~(VREAD|VWRITE); PROC_UNLOCK(procp); break; default: -- cgit v1.1