NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

chrooted ntpd not working on 4.0/sparc64



Hi all,

I have a problem with ntpd on NetBSD 4.0/sparc64.  I'm running it
chrooted, and that configuration doesn't seem to work.  The
/var/log/messages file is reporting this error:

ntpd[2862]: step-systime: Operation not permitted

I searched for references to this problem in the past, and found this
thread: http://mail-index.netbsd.org/current-users/2006/09/22/0004.html
It must have been fixed in -current, but perhaps something's changed
again since that time?  (Or perhaps it's user error?)

I do have the clockctl device compiled into my kernel, and it's present
in the chroot environment.

$ ls -l /var/chroot/ntpd/dev
total 0
crw-rw----  1 root  ntpd  125,   0 Jan 19 22:37 clockctl

My rc.conf file has the following:

ntpd=YES        ntpd_flags=""
ntpd_chrootdir="/var/chroot/ntpd"

The machine is running at securelevel 1:

security.curtain = 0
security.models.bsd44.name = Traditional NetBSD (4.4BSD)
security.models.bsd44.securelevel = 1
security.models.bsd44.curtain = 0

Here is some relevant ktrace output:

 2862      1 ntpd     CALL  clock_gettime(0,0xffffffffffffc590)
 2862      1 ntpd     RET   clock_gettime 0, -14960/0xffffffffffffc590
2862 1 ntpd CALL select(0x1e,0xffffffffffffbab8,0,0,0xffffffffffffbad8)
 2862      1 ntpd     RET   select 1, -17736/0xffffffffffffbab8
 2862      1 ntpd     CALL  recvmsg(0x1d,0xffffffffffffba88,0)
 2862      1 ntpd     GIO   fd 29 read 48 bytes
"$\^B\^F\M-n\0\0\b\M-v\0\0\f;\M-Q3\M-!\M-n\M-Kh\M-=\M-8*kJ\M-A\M-Kh\M-Ec
        \M-m\^F\^R\M-Kh\M-Eiqnp \M-Kh\M-Eiqoa\M-c"
 2862      1 ntpd     RET   recvmsg 48/0x30, -17784/0xffffffffffffba88
 2862      1 ntpd     CALL  recvmsg(0x1d,0xffffffffffffba88,0)
2862 1 ntpd RET recvmsg -1 errno 35 Resource temporarily unavailable
 2862      1 ntpd     CALL  setcontext(0xffffffffffffc7b0)
 2862      1 ntpd     RET   setcontext JUSTRETURN
 2862      1 ntpd     CALL  __sigprocmask14(2,0xffffffffffffcb40,0)
 2862      1 ntpd     RET   __sigprocmask14 0, -13504/0xffffffffffffcb40
 2862      1 ntpd     CALL  clock_gettime(0,0xffffffffffffc810)
 2862      1 ntpd     RET   clock_gettime 0, -14320/0xffffffffffffc810
 2862      1 ntpd     CALL  clock_gettime(0,0xffffffffffffc178)
 2862      1 ntpd     RET   clock_gettime 0, -16008/0xffffffffffffc178
 2862      1 ntpd     CALL  clock_settime(0,0xffffffffffffc0a0)
2862 1 ntpd RET clock_settime -1 errno 1 Operation not permitted
 2862      1 ntpd     CALL  open(0x40ef3ea0,1,0)
 2862      1 ntpd     NAMI  "/dev/clockctl"
 2862      1 ntpd     RET   open -1 errno 6 Device not configured
 2862      1 ntpd     CALL  adjtime(0xffffffffffffc090,0)
 2862      1 ntpd     RET   adjtime -1 errno 1 Operation not permitted
 2862      1 ntpd     CALL  open(0x40ef3ea0,1,0)
 2862      1 ntpd     NAMI  "/dev/clockctl"
 2862      1 ntpd     RET   open -1 errno 6 Device not configured
 2862      1 ntpd     CALL  settimeofday(0xffffffffffffc188,0)
 2862      1 ntpd     RET   settimeofday -1 errno 1 Operation not permitted
 2862      1 ntpd     CALL  open(0x40ef3ea0,1,0)
 2862      1 ntpd     NAMI  "/dev/clockctl"
 2862      1 ntpd     RET   open -1 errno 6 Device not configured
 2862      1 ntpd     CALL  issetugid
 2862      1 ntpd     RET   issetugid 1, 788529152/0x2f000000
 2862      1 ntpd     CALL  issetugid
 2862      1 ntpd     RET   issetugid 1, 1088634304/0x40e33dc0
 2862      1 ntpd     CALL  open(0xffffffffffffaad0,0,0)
 2862      1 ntpd     NAMI  "/usr/share/nls/nls.alias.db"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  open(0x40ef75a0,0,0)
 2862      1 ntpd     NAMI  "/usr/share/nls/nls.alias"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  open(0xffffffffffffb08f,0,0xffffffffffffafa8)
 2862      1 ntpd     NAMI  "/usr/share/nls/C/libc.cat"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  open(0xffffffffffffb08f,0,0xffffffffffffafa8)
 2862      1 ntpd     NAMI  "/usr/share/nls/libc/C"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  gettimeofday(0xffffffffffffab80,0)
 2862      1 ntpd     RET   gettimeofday 0
 2862      1 ntpd     CALL  getpid
 2862      1 ntpd     RET   getpid 2862/0xb2e, 2028/0x7ec
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  sendto(3,0xffffffffffffac60,0x45,0,0,0)
 2862      1 ntpd     GIO   fd 3 wrote 69 bytes
"<27>Feb 22 03:52:03 ntpd[2862]: step-systime: Operation not permitted"
 2862      1 ntpd     RET   sendto 69/0x45, -21408/0xffffffffffffac60
 2862      1 ntpd     CALL  gettimeofday(0xffffffffffffaea0,0)
 2862      1 ntpd     RET   gettimeofday 0
 2862      1 ntpd     CALL  getpid
 2862      1 ntpd     RET   getpid 2862/0xb2e, 2028/0x7ec
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  sendto(3,0xffffffffffffaf80,0x36,0,0,0)
 2862      1 ntpd     GIO   fd 3 wrote 54 bytes
      "<29>Feb 22 03:52:03 ntpd[2862]: time reset +6.385878 s"
 2862      1 ntpd     RET   sendto 54/0x36, -20608/0xffffffffffffaf80
 2862      1 ntpd     CALL  timer_gettime(3,0x2d86f0)
 2862      1 ntpd     RET   timer_gettime 0, 2983664/0x2d86f0
 2862      1 ntpd     CALL  timer_settime(3,0,0x2d86f0,0)
 2862      1 ntpd     RET   timer_settime 0
 2862      1 ntpd     CALL  open(0xffffffffffffbd8f,0,0x7f7f7f7f7f7f7f7f)
 2862      1 ntpd     NAMI  "/usr/share/zoneinfo/GMT"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  open(0xffffffffffffbd3f,0,0x7f7f7f7f7f7f7f7f)
 2862      1 ntpd     NAMI  "/usr/share/zoneinfo/posixrules"
 2862      1 ntpd     RET   open -1 errno 2 No such file or directory
 2862      1 ntpd     CALL  ntp_adjtime(0x2d77a8)
 2862      1 ntpd     RET   ntp_adjtime -1 errno 1 Operation not permitted
 2862      1 ntpd     CALL  open(0x40ef3ea0,1,0)
 2862      1 ntpd     NAMI  "/dev/clockctl"
 2862      1 ntpd     RET   open -1 errno 6 Device not configured
 2862      1 ntpd     CALL  gettimeofday(0xffffffffffffaea0,0)
 2862      1 ntpd     RET   gettimeofday 0
 2862      1 ntpd     CALL  getpid
 2862      1 ntpd     RET   getpid 2862/0xb2e, 2028/0x7ec
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  fcntl(3,3,0)
 2862      1 ntpd     RET   fcntl 2, 3
 2862      1 ntpd     CALL  sendto(3,0xffffffffffffaf80,0x43,0,0,0)
 2862      1 ntpd     GIO   fd 3 wrote 67 bytes
      "<29>Feb 22 03:52:03 ntpd[2862]: kernel time sync status change 0001"
 2862      1 ntpd     RET   sendto 67/0x43, -20608/0xffffffffffffaf80
 2862      1 ntpd     CALL  clock_gettime(0,0xffffffffffffc2d0)
 2862      1 ntpd     RET   clock_gettime 0, -15664/0xffffffffffffc2d0
 2862      1 ntpd     CALL  clock_gettime(0,0xffffffffffffc810)
 2862      1 ntpd     RET   clock_gettime 0, -14320/0xffffffffffffc810
 2862      1 ntpd     CALL  __sigprocmask14(1,0xffffffffffffcb40,0)
 2862      1 ntpd     RET   __sigprocmask14 0, -13504/0xffffffffffffcb40
 2862      1 ntpd     CALL  __sigprocmask14(2,0,0xffffffffffffcb40)
 2862      1 ntpd     RET   __sigprocmask14 0
 2862      1 ntpd     CALL  __sigsuspend14(0xffffffffffffcb40)
2862 1 ntpd RET __sigsuspend14 -1 errno 4 Interrupted system call
 2862      1 ntpd     PSIG  SIGALRM caught handler=0x12a200 mask=())
 2862      1 ntpd     CALL  setcontext(0xffffffffffffc7b0)
 2862      1 ntpd     RET   setcontext JUSTRETURN
 2862      1 ntpd     CALL  __sigprocmask14(2,0xffffffffffffcb40,0)
 2862      1 ntpd     RET   __sigprocmask14 0, -13504/0xffffffffffffcb40
 2862      1 ntpd     CALL  __sigprocmask14(1,0xffffffffffffcb40,0)
 2862      1 ntpd     RET   __sigprocmask14 0, -13504/0xffffffffffffcb40
 2862      1 ntpd     CALL  __sigprocmask14(2,0,0xffffffffffffcb40)
 2862      1 ntpd     RET   __sigprocmask14 0
 2862      1 ntpd     CALL  __sigsuspend14(0xffffffffffffcb40)
2862 1 ntpd RET __sigsuspend14 -1 errno 4 Interrupted system call
 2862      1 ntpd     PSIG  SIGALRM caught handler=0x12a200 mask=())

 Regards,

 Dave




Home | Main Index | Thread Index | Old Index