version 1.35, 2006/07/23 22:06:11 |
version 1.35.4.2, 2007/01/30 13:51:40 |
Line 56 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 56 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/kauth.h> |
#include <sys/kauth.h> |
|
|
#include <sys/mount.h> |
#include <sys/mount.h> |
#include <sys/sa.h> |
|
#include <sys/syscallargs.h> |
#include <sys/syscallargs.h> |
|
|
#include <machine/cpu.h> |
#include <machine/cpu.h> |
Line 247 sys_ntp_adjtime(l, v, retval) |
|
Line 246 sys_ntp_adjtime(l, v, retval) |
|
if (error != 0) |
if (error != 0) |
return (error); |
return (error); |
|
|
if (ntv.modes != 0 && (error = kauth_authorize_generic(l->l_cred, |
if (ntv.modes != 0 && (error = kauth_authorize_system(l->l_cred, |
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0) |
KAUTH_SYSTEM_TIME, KAUTH_REQ_SYSTEM_TIME_NTPADJTIME, NULL, |
|
NULL, NULL)) != 0) |
return (error); |
return (error); |
|
|
ntp_adjtime1(&ntv); |
ntp_adjtime1(&ntv); |
Line 922 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 922 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/kauth.h> |
#include <sys/kauth.h> |
|
|
#include <sys/mount.h> |
#include <sys/mount.h> |
#include <sys/sa.h> |
|
#include <sys/syscallargs.h> |
#include <sys/syscallargs.h> |
|
|
#include <machine/cpu.h> |
#include <machine/cpu.h> |
Line 1016 sys_ntp_adjtime(l, v, retval) |
|
Line 1015 sys_ntp_adjtime(l, v, retval) |
|
if (error != 0) |
if (error != 0) |
return (error); |
return (error); |
|
|
if (ntv.modes != 0 && (error = kauth_authorize_generic(l->l_cred, |
if (ntv.modes != 0 && (error = kauth_authorize_system(l->l_cred, |
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0) |
KAUTH_SYSTEM_TIME, KAUTH_REQ_SYSTEM_TIME_NTPADJTIME, NULL, |
|
NULL, NULL)) != 0) |
return (error); |
return (error); |
|
|
ntp_adjtime1(&ntv); |
ntp_adjtime1(&ntv); |
Line 1143 ntp_timestatus() |
|
Line 1143 ntp_timestatus() |
|
* ntp_gettime() - NTP user application interface |
* ntp_gettime() - NTP user application interface |
*/ |
*/ |
int |
int |
sys___ntp_gettime30(l, v, retval) |
sys___ntp_gettime30(struct lwp *l, void *v, register_t *retval) |
struct lwp *l; |
|
void *v; |
|
register_t *retval; |
|
{ |
{ |
struct sys___ntp_gettime30_args /* { |
struct sys___ntp_gettime30_args /* { |
syscallarg(struct ntptimeval *) ntvp; |
syscallarg(struct ntptimeval *) ntvp; |
Line 1168 sys___ntp_gettime30(l, v, retval) |
|
Line 1165 sys___ntp_gettime30(l, v, retval) |
|
|
|
#ifdef COMPAT_30 |
#ifdef COMPAT_30 |
int |
int |
compat_30_sys_ntp_gettime(l, v, retval) |
compat_30_sys_ntp_gettime(struct lwp *l, void *v, register_t *retval) |
struct lwp *l; |
|
void *v; |
|
register_t *retval; |
|
{ |
{ |
struct compat_30_sys_ntp_gettime_args /* { |
struct compat_30_sys_ntp_gettime_args /* { |
syscallarg(struct ntptimeval30 *) ontvp; |
syscallarg(struct ntptimeval30 *) ontvp; |
Line 1234 SYSCTL_SETUP(sysctl_kern_ntptime_setup, |
|
Line 1228 SYSCTL_SETUP(sysctl_kern_ntptime_setup, |
|
/* For some reason, raising SIGSYS (as sys_nosys would) is problematic. */ |
/* For some reason, raising SIGSYS (as sys_nosys would) is problematic. */ |
|
|
int |
int |
sys___ntp_gettime30(l, v, retval) |
sys___ntp_gettime30(struct lwp *l, void *v, register_t *retval) |
struct lwp *l; |
|
void *v; |
|
register_t *retval; |
|
{ |
{ |
|
|
return(ENOSYS); |
return(ENOSYS); |
Line 1245 sys___ntp_gettime30(l, v, retval) |
|
Line 1236 sys___ntp_gettime30(l, v, retval) |
|
|
|
#ifdef COMPAT_30 |
#ifdef COMPAT_30 |
int |
int |
compat_30_sys_ntp_gettime(l, v, retval) |
compat_30_sys_ntp_gettime(struct lwp *l, void *v, register_t *retval) |
struct lwp *l; |
|
void *v; |
|
register_t *retval; |
|
{ |
{ |
|
|
return(ENOSYS); |
return(ENOSYS); |