summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-15 21:03:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-15 21:03:40 +0000
commite08d7a2395baaf134e55c221ae906ed6fd19592e (patch)
treed7bd04e0e105669e86ece26ef4b129889815fe21 /sys
parentc7fe1d17a23f05f50f44565df8171243d28ea4dc (diff)
use sysctl_int_lower() for the aperture variable. This lets root close
the aperture without having to reboot, but does not allow re-opening; ok matthieu
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/machdep.c6
-rw-r--r--sys/arch/amd64/amd64/machdep.c6
-rw-r--r--sys/arch/i386/i386/machdep.c6
-rw-r--r--sys/arch/macppc/macppc/machdep.c6
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 9e24c5377be..ef445300b07 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.96 2006/01/17 20:28:59 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.97 2006/03/15 21:03:33 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -1790,8 +1790,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
case CPU_ALLOWAPERTURE:
#ifdef APERTURE
if (securelevel > 0)
- return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ return (sysctl_int_lower(oldp, oldlenp, newp, newlen,
+ &allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
&allowaperture));
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index f1a17614ef8..f99d65de2c6 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.46 2006/03/09 17:24:00 weingart Exp $ */
+/* $OpenBSD: machdep.c,v 1.47 2006/03/15 21:03:37 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -692,8 +692,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
return (ENOTDIR); /* overloaded */
#ifdef APERTURE
if (securelevel > 0)
- return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ return (sysctl_int_lower(oldp, oldlenp, newp, newlen,
+ &allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
&allowaperture));
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index acd227a12f7..c874ef52348 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.345 2006/03/14 09:02:29 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.346 2006/03/15 21:03:38 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -3276,8 +3276,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
case CPU_ALLOWAPERTURE:
#ifdef APERTURE
if (securelevel > 0)
- return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ return (sysctl_int_lower(oldp, oldlenp, newp, newlen,
+ &allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
&allowaperture));
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index a959993e491..50fd4de5b66 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.83 2005/12/17 07:31:26 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.84 2006/03/15 21:03:38 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -764,8 +764,8 @@ cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
case CPU_ALLOWAPERTURE:
#ifdef APERTURE
if (securelevel > 0)
- return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ return (sysctl_int_lower(oldp, oldlenp, newp, newlen,
+ &allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
&allowaperture));
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index a856db526ec..79efe3d3a7d 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.80 2006/01/02 18:19:41 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.81 2006/03/15 21:03:39 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -530,8 +530,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
case CPU_ALLOWAPERTURE:
#ifdef APERTURE
if (securelevel > 0)
- return (sysctl_rdint(oldp, oldlenp, newp,
- allowaperture));
+ return (sysctl_int_lower(oldp, oldlenp, newp, newlen,
+ &allowaperture));
else
return (sysctl_int(oldp, oldlenp, newp, newlen,
&allowaperture));