Subject: Re: ntpd at securelevel 2?
To: Hubert Feyrer <hubert@feyrer.de>
From: Chuck Swiger <cswiger@mac.com>
List: netbsd-help
Date: 05/29/2006 22:07:39
Hubert Feyrer wrote:
> I'd like to run ntpd on 3.0/sparc to keep time in sync.
> Using the stock /etc/ntp.conf, ntpd comes up and 'ntpq -c peers' shows
> something useful, but after a few minutes, ntpd starts burning CPU
> time, and ktrace says:
>
> 5771 ntpd clock_settime(0, 0xefffdbc0) Err#1 EPERM
> 5771 ntpd geteuid() = 0, -1
> 5771 ntpd clock_settime(0, 0xefffdbc0) Err#1 EPERM
> 5771 ntpd geteuid() = 0, -1
> ...
>
> infinitely. Accoring to the init(8) manpage, securelevel 2 restricts
> the settimeofday(2) call only.
>
> FWIW, the kernel does have options NTP and pseudo-device clockctl, and
> /dev/clockctl does exist.
>
> Is there anything obvious I'm missing?
If the clock is far enough off that it needs to step the time by setting
it, rather than using adjtime(), running at a high securelevel will
prevent ntpd from doing so. Reboot the system with a lower securelevel
until the clock is synced, and then try again at a higher securelevel.
It's possible the -x flag to ntpd will help, too....
--
-Chuck