diff options
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r-- | sys/fs/procfs/procfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs.c b/sys/fs/procfs/procfs.c index 76c128f..6d6162e 100644 --- a/sys/fs/procfs/procfs.c +++ b/sys/fs/procfs/procfs.c @@ -94,7 +94,9 @@ int procfs_attr(PFS_ATTR_ARGS) { /* XXX inefficient, split into separate functions */ - if (strcmp(pn->pn_name, "ctl") == 0 || + if (p->p_flag & P_SUGID) + vap->va_mode = 0; + else if (strcmp(pn->pn_name, "ctl") == 0 || strcmp(pn->pn_name, "note") == 0 || strcmp(pn->pn_name, "notepg") == 0) vap->va_mode = 0200; |