summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-08-03 17:20:34 +0000
committerrwatson <rwatson@FreeBSD.org>2001-08-03 17:20:34 +0000
commit90376d10b0f4f691b5bd0c7028cbbc1dd3a758db (patch)
tree0347d4154c76f9bcebd70aafb7318b678c0fe7b5 /sys/fs
parent9b545cd960d33753e961693f1aee7c16c22fac1b (diff)
downloadFreeBSD-src-90376d10b0f4f691b5bd0c7028cbbc1dd3a758db.zip
FreeBSD-src-90376d10b0f4f691b5bd0c7028cbbc1dd3a758db.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/procfs/procfs_vnops.c7
1 files changed, 2 insertions, 5 deletions
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:
OpenPOWER on IntegriCloud