Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/kern Pull up revision 1.44 (requested by elad in tick...
details: https://anonhg.NetBSD.org/src/rev/8483a214f6a2
branches: netbsd-3
changeset: 576364:8483a214f6a2
user: tron <tron%NetBSD.org@localhost>
date: Sat Jul 02 15:48:42 2005 +0000
description:
Pull up revision 1.44 (requested by elad in ticket #487):
Fix sysctl handling for raise-only variables. This affected the veriexec
node entirely. Reported by Nino Dehne.
diffstat:
sys/kern/init_sysctl.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 622d74d4347c -r 8483a214f6a2 sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c Sat Jul 02 15:48:21 2005 +0000
+++ b/sys/kern/init_sysctl.c Sat Jul 02 15:48:42 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysctl.c,v 1.36.2.2 2005/06/10 15:16:11 tron Exp $ */
+/* $NetBSD: init_sysctl.c,v 1.36.2.3 2005/07/02 15:48:42 tron Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.36.2.2 2005/06/10 15:16:11 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.36.2.3 2005/07/02 15:48:42 tron Exp $");
#include "opt_sysv.h"
#include "opt_multiprocessor.h"
@@ -2419,9 +2419,6 @@
return (EINVAL);
}
- if (raise_only && (*var != 0) && (securelevel > 0))
- return (EPERM);
-
newval = *var;
node.sysctl_data = &newval;
@@ -2430,6 +2427,9 @@
return (error);
}
+ if (raise_only && (newval < *var))
+ return (EPERM);
+
*var = newval;
return (error);
Home |
Main Index |
Thread Index |
Old Index