Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common Only let the superuser set the compa...
details: https://anonhg.NetBSD.org/src/rev/b0df83c6d535
branches: trunk
changeset: 355428:b0df83c6d535
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Jul 29 01:14:59 2017 +0000
description:
Only let the superuser set the compat_linux timezone.
Not really keen to invent a new kauth cookie for this useless purpose.
>From Ilja Van Sprundel.
diffstat:
sys/compat/linux/common/linux_time.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r ffd02d866b62 -r b0df83c6d535 sys/compat/linux/common/linux_time.c
--- a/sys/compat/linux/common/linux_time.c Sat Jul 29 01:14:00 2017 +0000
+++ b/sys/compat/linux/common/linux_time.c Sat Jul 29 01:14:59 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_time.c,v 1.37 2014/01/13 10:33:03 njoly Exp $ */
+/* $NetBSD: linux_time.c,v 1.38 2017/07/29 01:14:59 riastradh Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.37 2014/01/13 10:33:03 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.38 2017/07/29 01:14:59 riastradh Exp $");
#include <sys/param.h>
#include <sys/ucred.h>
@@ -79,6 +79,9 @@
}
if (SCARG(uap, tzp)) {
+ if (kauth_authorize_generic(kauth_cred_get(),
+ KAUTH_GENERIC_ISSUSER, NULL) != 0)
+ return (EPERM);
error = copyout(&linux_sys_tz, SCARG(uap, tzp), sizeof(linux_sys_tz));
if (error)
return (error);
Home |
Main Index |
Thread Index |
Old Index