diff options
| author | Don Lewis <truckman@FreeBSD.org> | 1998-12-13 07:19:13 +0000 |
|---|---|---|
| committer | Don Lewis <truckman@FreeBSD.org> | 1998-12-13 07:19:13 +0000 |
| commit | 2b648ac0a1f22f8b5acb82559d34872eb0e923f6 (patch) | |
| tree | e7a6e7444e1ad8ccbb906aa32f92d40706aaf53e /sys/kern/kern_sysctl.c | |
| parent | 9983067ebe85d0606b5e55f2b9c3b74947565f65 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_sysctl.c')
| -rw-r--r-- | sys/kern/kern_sysctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 0d5f22ea0245..b43c4eec0b42 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.78 1998/10/16 03:55:00 peter Exp $ + * $Id: kern_sysctl.c,v 1.79 1998/12/04 22:54:51 archie Exp $ */ #include "opt_compat.h" @@ -804,7 +804,8 @@ sysctl_root SYSCTL_HANDLER_ARGS return ENOENT; found: /* If writing isn't allowed */ - if (req->newptr && !((*oidpp)->oid_kind & CTLFLAG_WR)) + if (req->newptr && (!((*oidpp)->oid_kind & CTLFLAG_WR) || + (((*oidpp)->oid_kind & CTLFLAG_SECURE) && securelevel > 0))) return (EPERM); /* Most likely only root can write */ |
