diff options
author | 2015-07-19 02:35:35 +0000 | |
---|---|---|
committer | 2015-07-19 02:35:35 +0000 | |
commit | 586b470f3a48386e9005eb2372f8b7d7b2210f1f (patch) | |
tree | 08b5d85af5fb101552c8de4e8c5ebb6d8e87b6f8 /sys/kern/kern_time.c | |
parent | Remove the logic responsible for outputting most AES-NI instructions as (diff) | |
download | wireguard-openbsd-586b470f3a48386e9005eb2372f8b7d7b2210f1f.tar.xz wireguard-openbsd-586b470f3a48386e9005eb2372f8b7d7b2210f1f.zip |
tame(2) is a subsystem which restricts programs into a "reduced feature
operating model". This is the kernel component; various changes should
proceed in-tree for a while before userland programs start using it.
ok miod, discussions and help from many
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r-- | sys/kern/kern_time.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 453790b3682..1e7553924ce 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_time.c,v 1.90 2015/04/28 20:54:18 kettenis Exp $ */ +/* $OpenBSD: kern_time.c,v 1.91 2015/07/19 02:35:35 deraadt Exp $ */ /* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */ /* @@ -40,6 +40,7 @@ #include <sys/ktrace.h> #include <sys/vnode.h> #include <sys/signalvar.h> +#include <sys/tame.h> #include <sys/timetc.h> #include <sys/mount.h> @@ -432,6 +433,9 @@ sys_adjtime(struct proc *p, void *v, register_t *retval) struct timeval atv; int error; + if (tame_adjtime_check(p, delta)) + return (EPERM); + if (olddelta) { memset(&atv, 0, sizeof(atv)); atv.tv_sec = adjtimedelta / 1000000; |