diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-08-03 17:20:34 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-08-03 17:20:34 +0000 |
commit | 90376d10b0f4f691b5bd0c7028cbbc1dd3a758db (patch) | |
tree | 0347d4154c76f9bcebd70aafb7318b678c0fe7b5 /sys/fs | |
parent | 9b545cd960d33753e961693f1aee7c16c22fac1b (diff) | |
download | FreeBSD-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.c | 7 |
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: |