Subject: kern/15519: support for chroot'd "ntpd" incomplete
To: None <gnats-bugs@gnats.netbsd.org>
From: None <paul@Plectere.com>
List: netbsd-bugs
Date: 02/07/2002 02:29:33
>Number:         15519
>Category:       kern
>Synopsis:       support for chroot'd "ntpd" incomplete
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 07 02:30:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Paul Shupak
>Release:        NetBSD 1.5ZA -- current, today
>Organization:
	
>Environment:
	kernel w/ "pseudo-device clockctl" & "options NTP"
System: NetBSD svcs 1.5ZA NetBSD 1.5ZA (PCOM-$Revision: 1.24 $) #185: Wed Feb 6 22:35:17 PST 2002 paul@svcs:/usr/src/sys/arch/i386/compile/PCOM i386
Architecture: i386
Machine: i386
>Description:
	The ioctl call made in libc's ntp_adjtime() is actually unimplimented.
>How-To-Repeat:
	verify by runing a kernel with "options NTP" and
	"pseudo-device clockctl" and watch time `jump' instead
	of `skew'.  Or, run ntpdc's "kerninfo" command and look at
	error messages ( EINVAL returned from ntp_adjtime() ) and/or
	/var/log/messages.
>Fix:
--- /sys/dev/clockctl.c	Sun Dec  9 22:08:54 2001
+++ clockctl.c	Wed Feb  6 23:19:37 2002
@@ -33,6 +33,8 @@
 #include <sys/cdefs.h>
 __KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.4 2001/12/09 16:10:43 manu Exp $");
 
+#include "opt_ntp.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/proc.h>
@@ -125,7 +127,7 @@
 			struct clockctl_ntp_adjtime_args *args =
 			    (struct clockctl_ntp_adjtime_args *)data;
 
-			(void*)ntp_adjtime1(SCARG(args.uas,tp), &error);
+			(void) ntp_adjtime1(SCARG(args,uas.tp), args, &error);
 			return (error);	
 		}
 #endif /* NTP */
>Release-Note:
>Audit-Trail:
>Unformatted: