From d8f81b403fbc1cd712dbc3c425faff51e55e86b9 Mon Sep 17 00:00:00 2001 From: mvs Date: Tue, 6 Aug 2024 12:36:54 +0000 Subject: [PATCH] Unlock KERN_CLOCKRATE. Read-only access to local `clkinfo' filled with immutable data. ok bluhm --- sys/kern/kern_sysctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 8b0e93ffc7a..cc0d4537ee9 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.433 2024/08/05 18:47:29 mvs Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.434 2024/08/06 12:36:54 mvs Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -507,6 +507,8 @@ kern_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return (sysctl_rdstring(oldp, oldlenp, newp, version)); case KERN_NUMVNODES: /* XXX numvnodes is a long */ return (sysctl_rdint(oldp, oldlenp, newp, numvnodes)); + case KERN_CLOCKRATE: + return (sysctl_clockrate(oldp, oldlenp, newp)); case KERN_BOOTTIME: { struct timeval bt; memset(&bt, 0, sizeof bt); @@ -614,8 +616,6 @@ kern_sysctl_locked(int *name, u_int namelen, void *oldp, size_t *oldlenp, error = sysctl_int(oldp, oldlenp, newp, newlen, &inthostid); hostid = inthostid; return (error); - case KERN_CLOCKRATE: - return (sysctl_clockrate(oldp, oldlenp, newp)); case KERN_MSGBUFSIZE: case KERN_CONSBUFSIZE: { struct msgbuf *mp; -- 2.20.1