summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-09-16 10:06:57 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-09-16 10:06:57 +0000
commita6dffad470bfbb25f6f4cf8b1636119ea23955bb (patch)
tree9d8b75ed483e85199dec68b580feb3efcfb7a913
parentcdcfe03eedb965cecb3c704d627198cd70b2b8a9 (diff)
put HW_PHYSMEM64 case under CTL_HW not CTL_KERN
Fixes previous. Problem spotted by kettenis@
-rw-r--r--sys/kern/kern_pledge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 2372f2bc9a2..932b3287bba 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.264 2020/09/16 08:02:53 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.265 2020/09/16 10:06:56 jsg Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -946,7 +946,6 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new)
switch (mib[0]) {
case CTL_KERN:
switch (mib[1]) {
- case HW_PHYSMEM64: /* hw.physmem */
case KERN_DOMAINNAME: /* getdomainname() */
case KERN_HOSTNAME: /* gethostname() */
case KERN_OSTYPE: /* uname() */
@@ -965,6 +964,7 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new)
switch (mib[1]) {
case HW_MACHINE: /* uname() */
case HW_PAGESIZE: /* getpagesize() */
+ case HW_PHYSMEM64: /* hw.physmem */
case HW_NCPU: /* hw.ncpu */
case HW_NCPUONLINE: /* hw.ncpuonline */
return (0);