MFV r344878:

4.2.8p12 --> 4.2.8p13

MFC after:	immediately
Security:	CVE-2019-8936
		VuXML: c2576e14-36e2-11e9-9eda-206a8a720317
Obtained from:	nwtime.org
This commit is contained in:
Cy Schubert 2019-03-07 13:36:00 +00:00
commit 052d159a8b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344883
207 changed files with 18171 additions and 8098 deletions

View File

@ -1,16 +1,15 @@
This file is automatically generated from html/copyright.html This file is automatically generated from html/copyright.html
Copyright Notice Copyright Notice
jpg "Clone me," says Dolly sheepishly. jpg "Clone me," says Dolly sheepishly.
Last update: 2-Jan-2017 11:58 UTC Last update: 2-Jan-2017 11:58 UTC
_________________________________________________________________ __________________________________________________________________
The following copyright notice applies to all files collectively The following copyright notice applies to all files collectively called
called the Network Time Protocol Version 4 Distribution. Unless the Network Time Protocol Version 4 Distribution. Unless specifically
specifically declared otherwise in an individual file, this entire declared otherwise in an individual file, this entire notice applies as
notice applies as if the text was explicitly included in the file. if the text was explicitly included in the file.
*********************************************************************** ***********************************************************************
* * * *
* Copyright (c) University of Delaware 1992-2015 * * Copyright (c) University of Delaware 1992-2015 *
@ -62,13 +61,13 @@ This file is automatically generated from html/copyright.html
*********************************************************************** ***********************************************************************
The following individuals contributed in part to the Network Time The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of Protocol Distribution Version 4 and are acknowledged as authors of this
this work. work.
1. [1]Takao Abe <takao_abe@xurb.jp> Clock driver for JJY receivers 1. [1]Takao Abe <takao_abe@xurb.jp> Clock driver for JJY receivers
2. [2]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock 2. [2]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock
controller controller
3. [3]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial 3. [3]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial line
line and PCI-bus devices and PCI-bus devices
4. [4]Viraj Bais <vbais@mailman1.intel.com> and [5]Clayton Kirkwood 4. [4]Viraj Bais <vbais@mailman1.intel.com> and [5]Clayton Kirkwood
<kirkwood@striderfm.intel.com> port to WindowsNT 3.5 <kirkwood@striderfm.intel.com> port to WindowsNT 3.5
5. [6]Michael Barone <michael,barone@lmco.com> GPSVME fixes 5. [6]Michael Barone <michael,barone@lmco.com> GPSVME fixes
@ -84,13 +83,12 @@ This file is automatically generated from html/copyright.html
<Jean-Francois.Boudreault@viagenie.qc.ca> IPv6 support <Jean-Francois.Boudreault@viagenie.qc.ca> IPv6 support
12. [13]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer) 12. [13]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
13. [14]Steve Clift <clift@ml.csiro.au> OMEGA clock driver 13. [14]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
14. [15]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and 14. [15]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and help
help with target configuration with target configuration
15. [16]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference 15. [16]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port. clock driver, NT adj. residuals, integrated Greg's Winnt port.
16. [17]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port 16. [17]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
17. [18]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux 17. [18]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
port
18. [19]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for 18. [19]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119 NTP Version 2 as specified in RFC-1119
19. [20]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing 19. [20]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
@ -122,9 +120,8 @@ This file is automatically generated from html/copyright.html
code for Version 3 as specified in RFC-1305 code for Version 3 as specified in RFC-1305
36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code 36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance Maintenance
37. [40]David L. Mills <mills@udel.edu> Version 4 foundation, 37. [40]David L. Mills <mills@udel.edu> Version 4 foundation, precision
precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36
22, 36
38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port 38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility 39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port 40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
@ -136,22 +133,18 @@ This file is automatically generated from html/copyright.html
44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de> 44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling monitoring/trap scripts, statistics file handling
45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port 45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for 46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for NetInfo
NetInfo
47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules 47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of 48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory space on the stuff in the html/pic/ subdirectory
49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port 49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
50. [54]Michael Shields <shields@tembel.org> USNO clock driver 50. [54]Michael Shields <shields@tembel.org> USNO clock driver
51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock 51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock driver
driver
52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure 52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog) makeover, various other bits (see the ChangeLog)
53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port 53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast 54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast support
support 55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock driver
55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase, 56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
Solaris issues Solaris issues
57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing 57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
@ -160,7 +153,7 @@ This file is automatically generated from html/copyright.html
TrueTime clock driver TrueTime clock driver
59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and 59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD validated HTML documents according to the HTML DTD
_________________________________________________________________ __________________________________________________________________
References References

View File

@ -1,3 +1,48 @@
---
(4.2.8p13) 2019/03/07 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 3565] Crafted null dereference attack in authenticated
mode 6 packet <perlinger@ntp.org>
- reported by Magnus Stubman
* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <perlinger@ntp.org>
- applied patch by Ian Lepore
* [Bug 3558] Crash and integer size bug <perlinger@ntp.org>
- isolate and fix linux/windows specific code issue
* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <perlinger@ntp.org>
- provide better function for incremental string formatting
* [Bug 3555] Tidy up print alignment of debug output from ntpdate <perlinger@ntp.org>
- applied patch by Gerry Garvey
* [Bug 3554] config revoke stores incorrect value <perlinger@ntp.org>
- original finding by Gerry Garvey, additional cleanup needed
* [Bug 3549] Spurious initgroups() error message <perlinger@ntp.org>
- patch by Christous Zoulas
* [Bug 3548] Signature not verified on windows system <perlinger@ntp.org>
- finding by Chen Jiabin, plus another one by me
* [Bug 3541] patch to fix STA_NANO struct timex units <perlinger@ntp.org>
- applied patch by Maciej Szmigiero
* [Bug 3540] Cannot set minsane to 0 anymore <perlinger@ntp.org>
- applied patch by Andre Charbonneau
* [Bug 3539] work_fork build fails when droproot is not supported <perlinger@ntp.org>
- applied patch by Baruch Siach
* [Bug 3538] Build fails for no-MMU targets <perlinger@ntp.org>
- applied patch by Baruch Siach
* [Bug 3535] libparse won't handle GPS week rollover <perlinger@ntp.org>
- refactored handling of GPS era based on 'tos basedate' for
parse (TSIP) and JUPITER clocks
* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) <perlinger@ntp.org>
- patch by Daniel J. Luke; this does not fix a potential linker
regression issue on MacOS.
* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet
anomaly <perlinger@ntp.org>, reported by GGarvey.
- --enable-bug3527-fix support by HStenn
* [Bug 3526] Incorrect poll interval in packet <perlinger@ntp.org>
- applied patch by Gerry Garvey
* [Bug 3471] Check for openssl/[ch]mac.h. <perlinger@ntp.org>
- added missing check, reported by Reinhard Max <perlinger@ntp.org>
* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64
- this is a variant of [bug 3558] and should be fixed with it
* Implement --disable-signalled-io
--- ---
(4.2.8p12) 2018/08/14 Released by Harlan Stenn <stenn@ntp.org> (4.2.8p12) 2018/08/14 Released by Harlan Stenn <stenn@ntp.org>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -830,7 +830,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)" || chmod -R a+r "$(distdir)"
dist-gzip: distdir dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-bzip2: distdir dist-bzip2: distdir
@ -856,7 +856,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \ @echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2 "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-zip: distdir dist-zip: distdir
@ -874,7 +874,7 @@ dist dist-all:
distcheck: dist distcheck: dist
case '$(DIST_ARCHIVES)' in \ case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \ *.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \ *.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \ *.tar.lz*) \
@ -884,7 +884,7 @@ distcheck: dist
*.tar.Z*) \ *.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \ *.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \ *.zip*) \
unzip $(distdir).zip ;;\ unzip $(distdir).zip ;;\
esac esac

View File

@ -1,8 +1,60 @@
---
NTP 4.2.8p13 (Harlan Stenn <stenn@ntp.org>, 2019 Mar 07)
Focus: Security, Bug fixes, enhancements.
Severity: MEDIUM
This release fixes a bug that allows an attacker with access to an
explicitly trusted source to send a crafted malicious mode 6 (ntpq)
packet that can trigger a NULL pointer dereference, crashing ntpd.
It also provides 17 other bugfixes and 1 other improvement:
* [Sec 3565] Crafted null dereference attack in authenticated
mode 6 packet <perlinger@ntp.org>
- reported by Magnus Stubman
* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <perlinger@ntp.org>
- applied patch by Ian Lepore
* [Bug 3558] Crash and integer size bug <perlinger@ntp.org>
- isolate and fix linux/windows specific code issue
* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <perlinger@ntp.org>
- provide better function for incremental string formatting
* [Bug 3555] Tidy up print alignment of debug output from ntpdate <perlinger@ntp.org>
- applied patch by Gerry Garvey
* [Bug 3554] config revoke stores incorrect value <perlinger@ntp.org>
- original finding by Gerry Garvey, additional cleanup needed
* [Bug 3549] Spurious initgroups() error message <perlinger@ntp.org>
- patch by Christous Zoulas
* [Bug 3548] Signature not verified on windows system <perlinger@ntp.org>
- finding by Chen Jiabin, plus another one by me
* [Bug 3541] patch to fix STA_NANO struct timex units <perlinger@ntp.org>
- applied patch by Maciej Szmigiero
* [Bug 3540] Cannot set minsane to 0 anymore <perlinger@ntp.org>
- applied patch by Andre Charbonneau
* [Bug 3539] work_fork build fails when droproot is not supported <perlinger@ntp.org>
- applied patch by Baruch Siach
* [Bug 3538] Build fails for no-MMU targets <perlinger@ntp.org>
- applied patch by Baruch Siach
* [Bug 3535] libparse won't handle GPS week rollover <perlinger@ntp.org>
- refactored handling of GPS era based on 'tos basedate' for
parse (TSIP) and JUPITER clocks
* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) <perlinger@ntp.org>
- patch by Daniel J. Luke; this does not fix a potential linker
regression issue on MacOS.
* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet
anomaly <perlinger@ntp.org>, reported by GGarvey.
- --enable-bug3527-fix support by HStenn
* [Bug 3526] Incorrect poll interval in packet <perlinger@ntp.org>
- applied patch by Gerry Garvey
* [Bug 3471] Check for openssl/[ch]mac.h. <perlinger@ntp.org>
- added missing check, reported by Reinhard Max <perlinger@ntp.org>
* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64
- this is a variant of [bug 3558] and should be fixed with it
* Implement 'configure --disable-signalled-io'
-- --
NTP 4.2.8p12 (Harlan Stenn <stenn@ntp.org>, 2018/14/09) NTP 4.2.8p12 (Harlan Stenn <stenn@ntp.org>, 2018/14/09)
NOTE: this NEWS file will be undergoing more revisions.
Focus: Security, Bug fixes, enhancements. Focus: Security, Bug fixes, enhancements.
Severity: MEDIUM Severity: MEDIUM

265
contrib/ntp/aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# generated automatically by aclocal 1.15 -*- Autoconf -*- # generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -20,126 +20,121 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely. If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])]) To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# serial 9 -*- Autoconf -*- # longlong.m4 serial 17
# Enable extensions on systems that normally disable them. dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc. dnl From Paul Eggert.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Define HAVE_LONG_LONG_INT if 'long long int' works.
# Autoconf. Perhaps we can remove this once we can assume Autoconf # This fixes a bug in Autoconf 2.61, and can be faster
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # than what's in Autoconf 2.62 through 2.68.
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
# If autoconf reports a warning # Note: If the type 'long long int' exists but is only 32 bits large
# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS # defined. In this case you can treat 'long long int' like 'long int'.
# the fix is
# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
# but always AC_REQUIREd,
# 2) to ensure that for each occurrence of
# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
# or
# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# the corresponding gnulib module description has 'extensions' among
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
# invocation occurs in gl_EARLY, not in gl_INIT.
# AC_USE_SYSTEM_EXTENSIONS AC_DEFUN([AC_TYPE_LONG_LONG_INT],
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
# cause problems on some platforms (such as __EXTENSIONS__).
AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
if test "$MINIX" = yes; then
AC_DEFINE([_POSIX_SOURCE], [1],
[Define to 1 if you need to in order for `stat' and other
things to work.])
AC_DEFINE([_POSIX_1_SOURCE], [2],
[Define to 2 if the system does not provide POSIX.1 features
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
fi
dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
dnl provided.
case "$host_os" in
hpux*)
AC_DEFINE([_XOPEN_SOURCE], [500],
[Define to 500 only on HP-UX.])
;;
esac
AH_VERBATIM([__EXTENSIONS__],
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
])
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
[ac_cv_safe_to_define___extensions__],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
# define __EXTENSIONS__ 1
]AC_INCLUDES_DEFAULT])],
[ac_cv_safe_to_define___extensions__=yes],
[ac_cv_safe_to_define___extensions__=no])])
test $ac_cv_safe_to_define___extensions__ = yes &&
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
[ [
dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
dnl gnulib does not need it. But if it gets required by third-party macros AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a [ac_cv_type_long_long_int=yes
dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". if test "x${ac_cv_prog_cc_c99-no}" = xno; then
dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. if test $ac_cv_type_long_long_int = yes; then
AC_REQUIRE([AC_GNU_SOURCE]) dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
dnl If cross compiling, assume the bug is not important, since
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl nobody cross compiles for this platform as far as we know.
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[@%:@include <limits.h>
@%:@ifndef LLONG_MAX
@%:@ define HALF \
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
@%:@ define LLONG_MAX (HALF - 1 + HALF)
@%:@endif]],
[[long long int n = 1;
int i;
for (i = 0; ; i++)
{
long long int m = n << i;
if (m >> i != n)
return 1;
if (LLONG_MAX / 2 < m)
break;
}
return 0;]])],
[],
[ac_cv_type_long_long_int=no],
[:])
fi
fi])
if test $ac_cv_type_long_long_int = yes; then
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
[Define to 1 if the system has the type 'long long int'.])
fi
]) ])
# Copyright (C) 2002-2014 Free Software Foundation, Inc. # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
# This fixes a bug in Autoconf 2.61, and can be faster
# than what's in Autoconf 2.62 through 2.68.
# Note: If the type 'unsigned long long int' exists but is only 32 bits
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
# will not be defined. In this case you can treat 'unsigned long long int'
# like 'unsigned long int'.
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
[
AC_CACHE_CHECK([for unsigned long long int],
[ac_cv_type_unsigned_long_long_int],
[ac_cv_type_unsigned_long_long_int=yes
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
AC_LINK_IFELSE(
[_AC_TYPE_LONG_LONG_SNIPPET],
[],
[ac_cv_type_unsigned_long_long_int=no])
fi])
if test $ac_cv_type_unsigned_long_long_int = yes; then
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
[Define to 1 if the system has the type 'unsigned long long int'.])
fi
])
# Expands to a C program that can be used to test for simultaneous support
# of 'long long' and 'unsigned long long'. We don't want to say that
# 'long long' is available if 'unsigned long long' is not, or vice versa,
# because too many programs rely on the symmetry between signed and unsigned
# integer types (excluding 'bool').
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
[
AC_LANG_PROGRAM(
[[/* For now, do not test the preprocessor; as of 2007 there are too many
implementations with broken preprocessors. Perhaps this can
be revisited in 2012. In the meantime, code should not expect
#if to work with literals wider than 32 bits. */
/* Test literals. */
long long int ll = 9223372036854775807ll;
long long int nll = -9223372036854775807LL;
unsigned long long int ull = 18446744073709551615ULL;
/* Test constant expressions. */
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
int i = 63;]],
[[/* Test availability of runtime routines for shift and division. */
long long int llmax = 9223372036854775807ll;
unsigned long long int ullmax = 18446744073709551615ull;
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));]])
])
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -154,7 +149,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15' [am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15], [], m4_if([$1], [1.15.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
@ -170,12 +165,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl [AM_AUTOMAKE_VERSION([1.15.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2014 Free Software Foundation, Inc. # Copyright (C) 2011-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -237,7 +232,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -289,7 +284,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -320,7 +315,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -511,7 +506,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -587,7 +582,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -784,7 +779,7 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -805,7 +800,7 @@ if test x"${install_sh+set}" != xset; then
fi fi
AC_SUBST([install_sh])]) AC_SUBST([install_sh])])
# Copyright (C) 2003-2014 Free Software Foundation, Inc. # Copyright (C) 2003-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -826,7 +821,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -876,7 +871,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc. # Copyright (C) 1997-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -915,7 +910,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -944,7 +939,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Copyright (C) 1999-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -991,7 +986,7 @@ AC_LANG_POP([C])])
# For backward compatibility. # For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1010,7 +1005,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*- # Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1091,7 +1086,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file rm -f conftest.file
]) ])
# Copyright (C) 2009-2014 Free Software Foundation, Inc. # Copyright (C) 2009-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1151,7 +1146,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
]) ])
# Copyright (C) 2001-2014 Free Software Foundation, Inc. # Copyright (C) 2001-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1179,7 +1174,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2014 Free Software Foundation, Inc. # Copyright (C) 2006-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -1198,7 +1193,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2014 Free Software Foundation, Inc. # Copyright (C) 2004-2017 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -52,7 +52,7 @@ esac
case "$NTP_BDIR" in case "$NTP_BDIR" in
'') '')
case "$IAM" in case "$IAM" in
*.ntp.org) *.ntp.org | *.ntfo.org)
NTP_BDIR=host NTP_BDIR=host
;; ;;
*.udel.edu) *.udel.edu)

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -296,6 +296,9 @@
/* use old autokey session key behavior? */ /* use old autokey session key behavior? */
#undef DISABLE_BUG1243_FIX #undef DISABLE_BUG1243_FIX
/* use old autokey session key behavior? */
#undef DISABLE_BUG3527_FIX
/* synch TODR hourly? */ /* synch TODR hourly? */
#undef DOSYNCTODR #undef DOSYNCTODR
@ -550,7 +553,7 @@
/* Define to 1 if the system has the type `long long'. */ /* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG #undef HAVE_LONG_LONG
/* Define to 1 if the system has the type `long long int'. */ /* Define to 1 if the system has the type 'long long int'. */
#undef HAVE_LONG_LONG_INT #undef HAVE_LONG_LONG_INT
/* if you have SunOS LWP package */ /* if you have SunOS LWP package */
@ -1170,7 +1173,7 @@
/* deviant sigwait? */ /* deviant sigwait? */
#undef HAVE_UNIXWARE_SIGWAIT #undef HAVE_UNIXWARE_SIGWAIT
/* Define to 1 if the system has the type `unsigned long long int'. */ /* Define to 1 if the system has the type 'unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT #undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define to 1 if you have the `updwtmp' function. */ /* Define to 1 if you have the `updwtmp' function. */
@ -1611,6 +1614,28 @@ typedef unsigned int uintptr_t;
/* OK to use snprintb()? */ /* OK to use snprintb()? */
#undef USE_SNPRINTB #undef USE_SNPRINTB
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* Can we use SIGPOLL for tty IO? */ /* Can we use SIGPOLL for tty IO? */
#undef USE_TTY_SIGPOLL #undef USE_TTY_SIGPOLL
@ -1663,9 +1688,6 @@ typedef unsigned int uintptr_t;
/* enable thread safety */ /* enable thread safety */
#undef _THREAD_SAFE #undef _THREAD_SAFE
/* Define to 500 only on HP-UX. */
#undef _XOPEN_SOURCE
/* Are we _special_? */ /* Are we _special_? */
#undef __APPLE_USE_RFC_3542 #undef __APPLE_USE_RFC_3542
@ -1674,28 +1696,6 @@ typedef unsigned int uintptr_t;
# undef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__
#endif #endif
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif
/* deviant */ /* deviant */
#undef adjtimex #undef adjtimex

137
contrib/ntp/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ntp 4.2.8p12. # Generated by GNU Autoconf 2.69 for ntp 4.2.8p13.
# #
# Report bugs to <http://bugs.ntp.org./>. # Report bugs to <http://bugs.ntp.org./>.
# #
@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='ntp' PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp' PACKAGE_TARNAME='ntp'
PACKAGE_VERSION='4.2.8p12' PACKAGE_VERSION='4.2.8p13'
PACKAGE_STRING='ntp 4.2.8p12' PACKAGE_STRING='ntp 4.2.8p13'
PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./' PACKAGE_URL='http://www.ntp.org./'
@ -969,6 +969,7 @@ enable_clockctl
enable_linuxcaps enable_linuxcaps
enable_solarisprivs enable_solarisprivs
enable_trustedbsd_mac enable_trustedbsd_mac
enable_signalled_io
with_arlib with_arlib
with_net_snmp_config with_net_snmp_config
enable_libseccomp enable_libseccomp
@ -1051,6 +1052,7 @@ enable_hourly_todr_sync
enable_kernel_fll_bug enable_kernel_fll_bug
enable_bug1243_fix enable_bug1243_fix
enable_bug3020_fix enable_bug3020_fix
enable_bug3527_fix
enable_irig_sawtooth enable_irig_sawtooth
enable_nist enable_nist
enable_ntp_signd enable_ntp_signd
@ -1615,7 +1617,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures ntp 4.2.8p12 to adapt to many kinds of systems. \`configure' configures ntp 4.2.8p13 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1685,7 +1687,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of ntp 4.2.8p12:";; short | recursive ) echo "Configuration of ntp 4.2.8p13:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1734,6 +1736,7 @@ Optional Features and Packages:
--enable-solarisprivs + Use Solaris privileges for non-root clock control --enable-solarisprivs + Use Solaris privileges for non-root clock control
--enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
control control
--enable-signalled-io s Use signalled IO if we can
--with-arlib - deprecated, arlib not distributed --with-arlib - deprecated, arlib not distributed
--with-net-snmp-config + =net-snmp-config --with-net-snmp-config + =net-snmp-config
--enable-libseccomp EXPERIMENTAL: enable support for libseccomp --enable-libseccomp EXPERIMENTAL: enable support for libseccomp
@ -1826,6 +1829,7 @@ Optional Features and Packages:
--enable-kernel-fll-bug s if we should avoid a kernel FLL bug --enable-kernel-fll-bug s if we should avoid a kernel FLL bug
--enable-bug1243-fix + use unmodified autokey session keys --enable-bug1243-fix + use unmodified autokey session keys
--enable-bug3020-fix + Provide the explicit 127.0.0.0/8 martian filter --enable-bug3020-fix + Provide the explicit 127.0.0.0/8 martian filter
--enable-bug3527-fix + provide correct mode7 fudgetime2 behavior
--enable-irig-sawtooth s if we should enable the IRIG sawtooth filter --enable-irig-sawtooth s if we should enable the IRIG sawtooth filter
--enable-nist - if we should enable the NIST lockclock scheme --enable-nist - if we should enable the NIST lockclock scheme
--enable-ntp-signd - Provide support for Samba's signing daemon, --enable-ntp-signd - Provide support for Samba's signing daemon,
@ -1926,7 +1930,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
ntp configure 4.2.8p12 ntp configure 4.2.8p13
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@ -2635,7 +2639,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by ntp $as_me 4.2.8p12, which was It was created by ntp $as_me 4.2.8p13, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@ -3636,7 +3640,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='ntp' PACKAGE='ntp'
VERSION='4.2.8p12' VERSION='4.2.8p13'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -5116,8 +5120,6 @@ done
ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
if test "x$ac_cv_header_minix_config_h" = xyes; then : if test "x$ac_cv_header_minix_config_h" = xyes; then :
MINIX=yes MINIX=yes
@ -5138,14 +5140,6 @@ $as_echo "#define _MINIX 1" >>confdefs.h
fi fi
case "$host_os" in
hpux*)
$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
@ -24024,6 +24018,9 @@ case "$ntp_have_solarisprivs" in
$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h $as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
;;
'') ntp_have_solarisprivs="no"
;;
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
@ -24057,6 +24054,9 @@ case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h $as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
;;
*) ntp_use_trustedbsd_mac="no";
;;
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
@ -24576,6 +24576,16 @@ fi
done done
# HMS: does this need to be a cached variable?
# Check whether --enable-signalled-io was given.
if test "${enable_signalled_io+set}" = set; then :
enableval=$enable_signalled_io; use_signalled_io=$enableval
else
use_signalled_io=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
$as_echo_n "checking for SIGIO... " >&6; } $as_echo_n "checking for SIGIO... " >&6; }
if ${ntp_cv_hdr_def_sigio+:} false; then : if ${ntp_cv_hdr_def_sigio+:} false; then :
@ -24650,13 +24660,24 @@ case "$ntp_cv_hdr_def_sigio" in
ans=no ans=no
;; ;;
esac esac
case "$ans" in
no)
ans="Possible for $host but disabled because of reported problems"
;;
esac
;; ;;
esac esac
case "$ans" in case "$ans" in
yes) yes)
case "$use_signalled_io" in
yes)
$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h $as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
;;
*) ans="Allowed for $host but --disable-signalled-io was given"
;;
esac
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; } $as_echo "$ans" >&6; }
@ -28663,6 +28684,62 @@ case "$ntp_ok" in
$as_echo "#define CLOCK_BANC 1" >>confdefs.h $as_echo "#define CLOCK_BANC 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bcStartPci" >&5
$as_echo_n "checking for library containing bcStartPci... " >&6; }
if ${ac_cv_search_bcStartPci+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char bcStartPci ();
int
main ()
{
return bcStartPci ();
;
return 0;
}
_ACEOF
for ac_lib in '' bcsdk; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_bcStartPci=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_bcStartPci+:} false; then :
break
fi
done
if ${ac_cv_search_bcStartPci+:} false; then :
else
ac_cv_search_bcStartPci=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bcStartPci" >&5
$as_echo "$ac_cv_search_bcStartPci" >&6; }
ac_res=$ac_cv_search_bcStartPci
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
;; ;;
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
@ -31999,6 +32076,26 @@ $as_echo "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
esac esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want correct mode7 fudgetime2 behavior" >&5
$as_echo_n "checking if we want correct mode7 fudgetime2 behavior... " >&6; }
# Check whether --enable-bug3527-fix was given.
if test "${enable_bug3527_fix+set}" = set; then :
enableval=$enable_bug3527_fix; ans=$enableval
else
ans=yes
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
case "$ans" in
no)
$as_echo "#define DISABLE_BUG3527_FIX 1" >>confdefs.h
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
$as_echo_n "checking if we should use the IRIG sawtooth filter... " >&6; } $as_echo_n "checking if we should use the IRIG sawtooth filter... " >&6; }
@ -34054,7 +34151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by ntp $as_me 4.2.8p12, which was This file was extended by ntp $as_me 4.2.8p13, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -34121,7 +34218,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
ntp config.status 4.2.8p12 ntp config.status 4.2.8p13
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@ -1749,6 +1749,7 @@ case "$ntp_ok" in
yes) yes)
ntp_refclock=yes ntp_refclock=yes
AC_DEFINE([CLOCK_BANC], [1], [Datum/Bancomm bc635/VME interface?]) AC_DEFINE([CLOCK_BANC], [1], [Datum/Bancomm bc635/VME interface?])
AC_SEARCH_LIBS([bcStartPci], [bcsdk], , , [])
;; ;;
esac esac
AC_MSG_RESULT([$ntp_ok]) AC_MSG_RESULT([$ntp_ok])
@ -4194,6 +4195,24 @@ case "$ans" in
esac esac
AC_MSG_CHECKING([if we want correct mode7 fudgetime2 behavior])
AC_ARG_ENABLE(
[bug3527-fix],
[AS_HELP_STRING(
[--enable-bug3527-fix],
[+ provide correct mode7 fudgetime2 behavior]
)],
[ans=$enableval],
[ans=yes]
)
AC_MSG_RESULT([$ans])
case "$ans" in
no)
AC_DEFINE([DISABLE_BUG3527_FIX], [1],
[use old autokey session key behavior?])
esac
AC_MSG_CHECKING([if we should use the IRIG sawtooth filter]) AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
case "$host" in case "$host" in

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -93,6 +93,7 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */ #define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
#define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */ #define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */
#define GPSWEEKS 1024 /* GPS week cycle */
/* /*
* Gross hacks. I have illicit knowlege that there won't be overflows * Gross hacks. I have illicit knowlege that there won't be overflows
* here, the compiler often can't tell this. * here, the compiler often can't tell this.
@ -404,14 +405,21 @@ basedate_get_eracenter(void);
extern time_t extern time_t
basedate_get_erabase(void); basedate_get_erabase(void);
extern uint32_t
basedate_get_gpsweek(void);
extern uint32_t
basedate_expand_gpsweek(unsigned short weekno);
/* /*
* Additional support stuff for Ed Rheingold's calendrical calculations * Additional support stuff for Ed Rheingold's calendrical calculations
*/ */
/* /*
* Start day of NTP time as days past the imaginary date 12/1/1 BC. * Start day of NTP time as days past 0000-12-31 in the proleptic
* (This is the beginning of the Christian Era, or BCE.) * Gregorian calendar. (So 0001-01-01 is day number 1; this is the Rata
* Die counting scheme used by Ed Rheingold in his book "Calendrical
* Calculations".)
*/ */
#define DAY_NTP_STARTS 693596 #define DAY_NTP_STARTS 693596
@ -420,15 +428,25 @@ basedate_get_erabase(void);
*/ */
#define DAY_UNIX_STARTS 719163 #define DAY_UNIX_STARTS 719163
/*
* Start day of the GPS epoch. This is the Rata Die of 1980-01-06
*/
#define DAY_GPS_STARTS 722819
/* /*
* Difference between UN*X and NTP epoch (25567). * Difference between UN*X and NTP epoch (25567).
*/ */
#define NTP_TO_UNIX_DAYS (DAY_UNIX_STARTS - DAY_NTP_STARTS) #define NTP_TO_UNIX_DAYS (DAY_UNIX_STARTS - DAY_NTP_STARTS)
/*
* Difference between GPS and NTP epoch (29224)
*/
#define NTP_TO_GPS_DAYS (DAY_GPS_STARTS - DAY_NTP_STARTS)
/* /*
* Days in a normal 4 year leap year calendar cycle (1461). * Days in a normal 4 year leap year calendar cycle (1461).
*/ */
#define GREGORIAN_NORMAL_LEAP_CYCLE_DAYS (3 * 365 + 366) #define GREGORIAN_NORMAL_LEAP_CYCLE_DAYS (4 * 365 + 1)
/* /*
* Days in a normal 100 year leap year calendar (36524). We lose a * Days in a normal 100 year leap year calendar (36524). We lose a

View File

@ -40,6 +40,9 @@ extern void setup_logfile (const char *);
extern void errno_to_str(int, char *, size_t); extern void errno_to_str(int, char *, size_t);
#endif #endif
extern int xvsbprintf(char**, char* const, char const*, va_list) NTP_PRINTF(3, 0);
extern int xsbprintf(char**, char* const, char const*, ...) NTP_PRINTF(3, 4);
/* /*
* When building without OpenSSL, use a few macros of theirs to * When building without OpenSSL, use a few macros of theirs to
* minimize source differences in NTP. * minimize source differences in NTP.

View File

@ -275,8 +275,8 @@ extern u_long orphwait; /* orphan wait time */
extern char *sys_hostname; /* host name */ extern char *sys_hostname; /* host name */
extern char *sys_groupname; /* group name */ extern char *sys_groupname; /* group name */
extern char *group_name; /* group name */ extern char *group_name; /* group name */
extern u_long sys_revoke; /* keys revoke timeout */ extern u_char sys_revoke; /* keys revoke timeout */
extern u_long sys_automax; /* session key timeout */ extern u_char sys_automax; /* session key timeout */
#endif /* AUTOKEY */ #endif /* AUTOKEY */
/* ntp_util.c */ /* ntp_util.c */

View File

@ -108,7 +108,6 @@ extern unsigned int splclock (void);
* some constants useful for GPS time conversion * some constants useful for GPS time conversion
*/ */
#define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */ #define GPSORIGIN 2524953600UL /* NTP origin - GPS origin in seconds */
#define GPSWRAP 990 /* assume week count less than this in the previous epoch */
#define GPSWEEKS 1024 /* number of weeks until the GPS epch rolls over */ #define GPSWEEKS 1024 /* number of weeks until the GPS epch rolls over */
/* /*

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -110,6 +110,7 @@ libntp_a_SRCS = \
vint64ops.c \ vint64ops.c \
work_fork.c \ work_fork.c \
work_thread.c \ work_thread.c \
xsbprintf.c \
ymd2yd.c \ ymd2yd.c \
$(libisc_SRCS) \ $(libisc_SRCS) \
$(NULL) $(NULL)

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -160,7 +160,7 @@ am__libntp_a_SOURCES_DIST = systime.c a_md5encrypt.c adjtime.c \
snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \ snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \ statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \ timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
ymd2yd.c $(srcdir)/../lib/isc/assertions.c \ xsbprintf.c ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
$(srcdir)/../lib/isc/buffer.c \ $(srcdir)/../lib/isc/buffer.c \
$(srcdir)/../lib/isc/backtrace-emptytbl.c \ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
$(srcdir)/../lib/isc/backtrace.c \ $(srcdir)/../lib/isc/backtrace.c \
@ -224,8 +224,8 @@ am__objects_4 = a_md5encrypt.$(OBJEXT) adjtime.$(OBJEXT) \
ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \ ssl_init.$(OBJEXT) statestr.$(OBJEXT) strdup.$(OBJEXT) \
strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timetoa.$(OBJEXT) \ strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timetoa.$(OBJEXT) \
timevalops.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \ timevalops.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \
work_fork.$(OBJEXT) work_thread.$(OBJEXT) ymd2yd.$(OBJEXT) \ work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \
$(am__objects_3) $(am__objects_1) ymd2yd.$(OBJEXT) $(am__objects_3) $(am__objects_1)
am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4) am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS) libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
libntpsim_a_AR = $(AR) $(ARFLAGS) libntpsim_a_AR = $(AR) $(ARFLAGS)
@ -244,7 +244,7 @@ am__libntpsim_a_SOURCES_DIST = systime_s.c a_md5encrypt.c adjtime.c \
snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \ snprintf.c socket.c socktoa.c socktohost.c ssl_init.c \
statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \ statestr.c strdup.c strl_obsd.c syssignal.c timetoa.c \
timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \ timevalops.c uglydate.c vint64ops.c work_fork.c work_thread.c \
ymd2yd.c $(srcdir)/../lib/isc/assertions.c \ xsbprintf.c ymd2yd.c $(srcdir)/../lib/isc/assertions.c \
$(srcdir)/../lib/isc/buffer.c \ $(srcdir)/../lib/isc/buffer.c \
$(srcdir)/../lib/isc/backtrace-emptytbl.c \ $(srcdir)/../lib/isc/backtrace-emptytbl.c \
$(srcdir)/../lib/isc/backtrace.c \ $(srcdir)/../lib/isc/backtrace.c \
@ -704,6 +704,7 @@ libntp_a_SRCS = \
vint64ops.c \ vint64ops.c \
work_fork.c \ work_fork.c \
work_thread.c \ work_thread.c \
xsbprintf.c \
ymd2yd.c \ ymd2yd.c \
$(libisc_SRCS) \ $(libisc_SRCS) \
$(NULL) $(NULL)
@ -876,6 +877,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vint64ops.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_fork.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_fork.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work_thread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsbprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ymd2yd.Po@am__quote@
.c.o: .c.o:

View File

@ -221,12 +221,14 @@ authreadkeys(
log_maybe(NULL, log_maybe(NULL,
"authreadkeys: invalid type for key %d", "authreadkeys: invalid type for key %d",
keyno); keyno);
# ifdef ENABLE_CMAC
} else if (NID_cmac != keytype && } else if (NID_cmac != keytype &&
EVP_get_digestbynid(keytype) == NULL) { EVP_get_digestbynid(keytype) == NULL) {
log_maybe(NULL, log_maybe(NULL,
"authreadkeys: no algorithm for key %d", "authreadkeys: no algorithm for key %d",
keyno); keyno);
keytype = 0; keytype = 0;
# endif /* ENABLE_CMAC */
} }
#else /* !OPENSSL follows */ #else /* !OPENSSL follows */
/* /*

View File

@ -54,7 +54,7 @@ calmonthstart(u_int32 ntptime, const time_t *pivot)
} }
/* /*
* calweekstart - get NTP time at midnight of the last monday on or * calweekstart - get NTP time at midnight of the last Monday on or
* before the current date. * before the current date.
*/ */
u_int32 u_int32

View File

@ -1832,6 +1832,7 @@ isocal_date_to_ntp(
*/ */
static int32_t s_baseday = NTP_TO_UNIX_DAYS; static int32_t s_baseday = NTP_TO_UNIX_DAYS;
static int32_t s_gpsweek = 0;
int32_t int32_t
basedate_eval_buildstamp(void) basedate_eval_buildstamp(void)
@ -1901,6 +1902,7 @@ basedate_set_day(
struct calendar jd; struct calendar jd;
int32_t retv; int32_t retv;
/* set NTP base date for NTP era unfolding */
if (day < NTP_TO_UNIX_DAYS) { if (day < NTP_TO_UNIX_DAYS) {
msyslog(LOG_WARNING, msyslog(LOG_WARNING,
"baseday_set_day: invalid day (%lu), UNIX epoch substituted", "baseday_set_day: invalid day (%lu), UNIX epoch substituted",
@ -1912,6 +1914,17 @@ basedate_set_day(
ntpcal_rd_to_date(&jd, day + DAY_NTP_STARTS); ntpcal_rd_to_date(&jd, day + DAY_NTP_STARTS);
msyslog(LOG_INFO, "basedate set to %04hu-%02hu-%02hu", msyslog(LOG_INFO, "basedate set to %04hu-%02hu-%02hu",
jd.year, (u_short)jd.month, (u_short)jd.monthday); jd.year, (u_short)jd.month, (u_short)jd.monthday);
/* set GPS base week for GPS week unfolding */
day = ntpcal_weekday_ge(day + DAY_NTP_STARTS, CAL_SUNDAY)
- DAY_NTP_STARTS;
if (day < NTP_TO_GPS_DAYS)
day = NTP_TO_GPS_DAYS;
s_gpsweek = (day - NTP_TO_GPS_DAYS) / DAYSPERWEEK;
ntpcal_rd_to_date(&jd, day + DAY_NTP_STARTS);
msyslog(LOG_INFO, "gps base set to %04hu-%02hu-%02hu (week %d)",
jd.year, (u_short)jd.month, (u_short)jd.monthday, s_gpsweek);
return retv; return retv;
} }
@ -1934,4 +1947,29 @@ basedate_get_erabase(void)
return retv; return retv;
} }
uint32_t
basedate_get_gpsweek(void)
{
return s_gpsweek;
}
uint32_t
basedate_expand_gpsweek(
unsigned short weekno
)
{
/* We do a fast modulus expansion here. Since all quantities are
* unsigned and we cannot go before the start of the GPS epoch
* anyway, and since the truncated GPS week number is 10 bit, the
* expansion becomes a simple sub/and/add sequence.
*/
#if GPSWEEKS != 1024
# error GPSWEEKS defined wrong -- should be 1024!
#endif
uint32_t diff;
diff = ((uint32_t)weekno - s_gpsweek) & (GPSWEEKS - 1);
return s_gpsweek + diff;
}
/* -*-EOF-*- */ /* -*-EOF-*- */

View File

@ -89,7 +89,9 @@ netwrite(
} }
int set_user_group_ids(void); #if defined(HAVE_DROPROOT)
extern int set_user_group_ids(void);
#endif
/* === functions === */ /* === functions === */
/* /*
@ -594,7 +596,9 @@ fork_blocking_child(
init_logging("ntp_intres", 0, FALSE); init_logging("ntp_intres", 0, FALSE);
setup_logfile(NULL); setup_logfile(NULL);
#ifdef HAVE_DROPROOT
(void) set_user_group_ids(); (void) set_user_group_ids();
#endif
/* /*
* And now back to the portable code * And now back to the portable code

View File

@ -0,0 +1,75 @@
/*
* xsbprintf.c - string buffer formatting helpers
*
* Written by Juergen Perlinger (perlinger@ntp.org) for the NTP project.
* The contents of 'html/copyright.html' apply.
*/
#include <config.h>
#include <sys/types.h>
#include "ntp_stdlib.h"
/* eXtended Varlist String Buffer printf
*
* Formats via 'vsnprintf' into a string buffer, with some semantic
* specialties:
*
* - The start of the buffer pointer is updated according to the number
* of characters written.
* - If the buffer is insufficient to format the number of charactes,
* the partial result will be be discarded, and zero is returned to
* indicate nothing was written to the buffer.
* - On successful formatting, the return code is the return value of
* the inner call to 'vsnprintf()'.
* - If there is any error, the state of the buffer will not be
* changed. (Bytes in the buffer might be smashed, but the buffer
* position does not change, and the NUL marker stays in place at the
* current buffer position.)
* - If '(*ppbuf - pend) <= 0' (or ppbuf is NULL), fail with EINVAL.
*/
int
xvsbprintf(
char **ppbuf, /* pointer to buffer pointer (I/O) */
char * const pend, /* buffer end (I) */
char const *pfmt, /* printf-like format string */
va_list va /* formatting args for above */
)
{
char *pbuf = (ppbuf) ? *ppbuf : NULL;
int rc = -1;
if (pbuf && (pend - pbuf > 0)) {
size_t blen = (size_t)(pend - pbuf);
rc = vsnprintf(pbuf, blen, pfmt, va);
if (rc > 0) {
if ((size_t)rc >= blen)
rc = 0;
pbuf += rc;
}
*pbuf = '\0'; /* fear of bad vsnprintf */
*ppbuf = pbuf;
} else {
errno = EINVAL;
}
return rc;
}
/* variadic wrapper around the buffer string formatter */
int
xsbprintf(
char **ppbuf, /* pointer to buffer pointer (I/O) */
char * const pend, /* buffer end (I) */
char const *pfmt, /* printf-like format string */
... /* formatting args for above */
)
{
va_list va;
int rc;
va_start(va, pfmt);
rc = xvsbprintf(ppbuf, pend, pfmt, va);
va_end(va);
return rc;
}
/* that's all folks! */

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -265,9 +265,7 @@ cvt_trimtsip(
clock_time->flags = PARSEB_POWERUP; clock_time->flags = PARSEB_POWERUP;
return CVT_OK; return CVT_OK;
} }
if (week < GPSWRAP) { week = basedate_expand_gpsweek(week);
week += GPSWEEKS;
}
/* time OK */ /* time OK */
@ -351,14 +349,12 @@ cvt_trimtsip(
int tls = t->t_gpsutc = (u_short) getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */ int tls = t->t_gpsutc = (u_short) getshort((unsigned char *)&mb(12)); /* current leap correction (GPS-UTC) */
int tlsf = t->t_gpsutcleap = (u_short) getshort((unsigned char *)&mb(24)); /* new leap correction */ int tlsf = t->t_gpsutcleap = (u_short) getshort((unsigned char *)&mb(24)); /* new leap correction */
t->t_weekleap = (u_short) getshort((unsigned char *)&mb(20)); /* week no of leap correction */ t->t_weekleap = basedate_expand_gpsweek(
if (t->t_weekleap < GPSWRAP) (u_short) getshort((unsigned char *)&mb(20))); /* week no of leap correction */
t->t_weekleap = (u_short)(t->t_weekleap + GPSWEEKS);
t->t_dayleap = (u_short) getshort((unsigned char *)&mb(22)); /* day in week of leap correction */ t->t_dayleap = (u_short) getshort((unsigned char *)&mb(22)); /* day in week of leap correction */
t->t_week = (u_short) getshort((unsigned char *)&mb(18)); /* current week no */ t->t_week = basedate_expand_gpsweek(
if (t->t_week < GPSWRAP) (u_short) getshort((unsigned char *)&mb(18))); /* current week no */
t->t_week = (u_short)(t->t_weekleap + GPSWEEKS);
lbp = (unsigned char *)&mb(14); /* last update time */ lbp = (unsigned char *)&mb(14); /* last update time */
if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK) if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)

View File

@ -45,11 +45,6 @@ gpstolfp(
l_fp * lfp l_fp * lfp
) )
{ {
if (weeks < GPSWRAP)
{
weeks += GPSWEEKS;
}
lfp->l_ui = (uint32_t)(weeks * SECSPERWEEK + days * SECSPERDAY + seconds + GPSORIGIN); /* convert to NTP time */ lfp->l_ui = (uint32_t)(weeks * SECSPERWEEK + days * SECSPERDAY + seconds + GPSORIGIN); /* convert to NTP time */
lfp->l_uf = 0; lfp->l_uf = 0;
} }

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:29:07 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:56:39 AM by AutoGen 5.18.5
# From the definitions ntp.conf.def # From the definitions ntp.conf.def
# and the template file agtexi-file.tpl # and the template file agtexi-file.tpl
@end ignore @end ignore

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:29:10 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:56:41 AM by AutoGen 5.18.5
# From the definitions ntp.keys.def # From the definitions ntp.keys.def
# and the template file agtexi-file.tpl # and the template file agtexi-file.tpl
@end ignore @end ignore

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:29:12 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:56:42 AM by AutoGen 5.18.5
# From the definitions ntpd-opts.def # From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl # and the template file agtexi-cmd.tpl
@end ignore @end ignore
@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0 @exampleindent 0
@example @example
ntpd - NTP daemon program - Ver. 4.2.8p12 ntpd - NTP daemon program - Ver. 4.2.8p13
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ] [ <server1> ... <serverN> ]
Flg Arg Option-Name Description Flg Arg Option-Name Description
@ -164,7 +164,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-g no panicgate Allow the first adjustment to be Big -g no panicgate Allow the first adjustment to be Big
- may appear multiple times - may appear multiple times
-G no force-step-once Step any initial offset correction. -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory -i --- jaildir built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
-I Str interface Listen on an interface name or address -I Str interface Listen on an interface name or address
- may appear multiple times - may appear multiple times
-k Str keyfile path to symmetric keys -k Str keyfile path to symmetric keys
@ -187,7 +187,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-s Str statsdir Statistics file location -s Str statsdir Statistics file location
-t Str trustedkey Trusted key number -t Str trustedkey Trusted key number
- may appear multiple times - may appear multiple times
-u Str user Run as userid (or userid:groupid) -u --- user built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs
-U Num updateinterval interval in seconds between scans for new or dropped interfaces -U Num updateinterval interval in seconds between scans for new or dropped interfaces
Str var make ARG an ntp variable (RW) Str var make ARG an ntp variable (RW)
- may appear multiple times - may appear multiple times

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntp.conf 5man "14 Aug 2018" "4.2.8p12" "File Formats" .TH ntp.conf 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-2caiQA/ag-bdaaPA) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:28:54 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def .\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTP_CONF 5mdoc File Formats .Dt NTP_CONF 5mdoc File Formats
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:15 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def .\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntp.conf 5 "14 Aug 2018" "4.2.8p12" "File Formats" .TH ntp.conf 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-2caiQA/ag-bdaaPA) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:28:54 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:43 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def .\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTP_CONF 5 File Formats .Dt NTP_CONF 5 File Formats
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:15 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:34 AM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def .\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -1,8 +1,8 @@
.TH ntp.keys 5man "14 Aug 2018" "4.2.8p12" "File Formats" .TH ntp.keys 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:28:59 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def .\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl .\" and the template file agman-file.tpl
.Sh NAME .Sh NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTP_KEYS 5mdoc File Formats .Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10 .Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:18 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def .\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl .\" and the template file agmdoc-file.tpl
.Sh NAME .Sh NAME

View File

@ -1,83 +1,123 @@
<html lang="en"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NTP Symmetric Key</title> <title>NTP Symmetric Key</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="NTP Symmetric Key"> <meta name="description" content="NTP Symmetric Key">
<meta name="generator" content="makeinfo 4.7"> <meta name="keywords" content="NTP Symmetric Key">
<link title="Top" rel="top" href="#Top"> <meta name="resource-type" content="document">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta name="distribution" content="global">
<meta http-equiv="Content-Style-Type" content="text/css"> <meta name="Generator" content="makeinfo">
<style type="text/css"><!-- <link href="#Top" rel="start" title="Top">
pre.display { font-family:inherit } <link href="dir.html#Top" rel="up" title="(dir)">
pre.format { font-family:inherit } <style type="text/css">
pre.smalldisplay { font-family:inherit; font-size:smaller } <!--
pre.smallformat { font-family:inherit; font-size:smaller } a.summary-letter {text-decoration: none}
pre.smallexample { font-size:smaller } blockquote.indentedblock {margin-right: 0em}
pre.smalllisp { font-size:smaller } blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
span.sc { font-variant:small-caps } blockquote.smallquotation {font-size: smaller}
span.roman { font-family: serif; font-weight: normal; } div.display {margin-left: 3.2em}
--></style> div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head> </head>
<body>
<h1 class="settitle">NTP Symmetric Key</h1> <body lang="en">
<div class="node"> <h1 class="settitle" align="center">NTP Symmetric Key</h1>
<p><hr>
<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Description">ntp.keys Description</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<br>
<a name="Top"></a>
<div class="header">
<p>
Next: <a href="#ntp_002ekeys-Description" accesskey="n" rel="next">ntp.keys Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div> </div>
<a name="NTP_0027s-Symmetric-Key-File-User-Manual"></a>
<h1 class="top">NTP&rsquo;s Symmetric Key File User Manual</h1>
<h2 class="unnumbered">NTP's Symmetric Key File User Manual</h2> <p>This document describes the symmetric key file for the NTP Project&rsquo;s
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program. <code>ntpd</code> program.
</p>
<p>This document applies to version 4.2.8p13 of <code>ntp.keys</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<p>This document applies to version 4.2.8p12 of <code>ntp.keys</code>. <div class="shortcontents">
<ul class="no-bullet">
<div class="shortcontents"> <li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
<h2>Short Contents</h2>
<ul>
<a href="#Top">NTP's Symmetric Key File User Manual</a>
</ul> </ul>
</div> </div>
<ul class="menu">
<li><a accesskey="1" href="#ntp_002ekeys-Description">ntp.keys Description</a>
<li><a accesskey="2" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
</ul>
<div class="node"> <table class="menu" border="0" cellspacing="0">
<p><hr> <tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Description" accesskey="1">ntp.keys Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
<a name="ntp_002ekeys-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>, </td></tr>
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> <tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="2">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
<br> </td></tr>
</table>
<hr>
<a name="ntp_002ekeys-Description"></a>
<div class="header">
<p>
Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div> </div>
<a name="Description"></a>
<!-- node-name, next, previous, up --> <h2 class="chapter">1 Description</h2>
<h3 class="section">Description</h3>
<p>The name and location of the symmetric key file for <code>ntpd</code> can <p>The name and location of the symmetric key file for <code>ntpd</code> can
be specified in a configuration file, by default <code>/etc/ntp.keys</code>. be specified in a configuration file, by default <code>/etc/ntp.keys</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="1">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<div class="node"> <hr>
<p><hr>
<a name="ntp_002ekeys-Notes"></a> <a name="ntp_002ekeys-Notes"></a>
<br> <div class="header">
<p>
Previous: <a href="#ntp_002ekeys-See-Also" accesskey="p" rel="prev">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Description" accesskey="u" rel="up">ntp.keys Description</a> &nbsp; </p>
</div> </div>
<a name="Notes-about-ntp_002ekeys"></a>
<h3 class="section">1.1 Notes about ntp.keys</h3>
<a name="index-ntp_002ekeys"></a>
<a name="index-NTP-symmetric-key-file-format"></a>
<h3 class="section">Notes about ntp.keys</h3>
<p><a name="index-ntp_002ekeys-1"></a><a name="index-NTP-symmetric-key-file-format-2"></a>
<p>This document describes the format of an NTP symmetric key file. <p>This document describes the format of an NTP symmetric key file.
For a description of the use of this type of file, see the For a description of the use of this type of file, see the
"Authentication Support" &quot;Authentication Support&quot;
section of the section of the
<code>ntp.conf(5)</code> <code>ntp.conf(5)</code>
page. page.
</p>
<p><code>ntpd(8)</code> <p><code>ntpd(8)</code>
reads its keys from a file specified using the reads its keys from a file specified using the
<code>-k</code> <code>-k</code>
command line option or the command line option or the
@ -88,14 +128,16 @@ While key number 0 is fixed by the NTP standard
and may not be changed, and may not be changed,
one or more keys numbered between 1 and 65535 one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file. may be arbitrarily set in the keys file.
</p>
<p>The key file uses the same comment conventions <p>The key file uses the same comment conventions
as the configuration file. as the configuration file.
Key entries use a fixed format of the form Key entries use a fixed format of the form
</p>
<div class="example">
<pre class="example"><kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd> <kbd>opt_IP_list</kbd>
</pre></div>
<pre class="example"> <kbd>keyno</kbd> <kbd>type</kbd> <kbd>key</kbd> <kbd>opt_IP_list</kbd> <p>where
</pre>
<p>where
<kbd>keyno</kbd> <kbd>keyno</kbd>
is a positive integer (between 1 and 65535), is a positive integer (between 1 and 65535),
<kbd>type</kbd> <kbd>type</kbd>
@ -119,8 +161,8 @@ If
is empty, is empty,
any properly-authenticated message will be any properly-authenticated message will be
accepted. accepted.
</p>
<p>The <p>The
<kbd>key</kbd> <kbd>key</kbd>
may be given in a format may be given in a format
controlled by the controlled by the
@ -140,77 +182,86 @@ must be either
<code>SHA</code> <code>SHA</code>
or or
<code>SHA1</code>. <code>SHA1</code>.
</p>
<p>What follows are some key types, and corresponding formats: <p>What follows are some key types, and corresponding formats:
</p>
<dl> <dl compact="compact">
<dt><code>MD5</code><dd>The key is 1 to 16 printable characters terminated by <dt><code>MD5</code></dt>
<dd><p>The key is 1 to 16 printable characters terminated by
an EOL, an EOL,
whitespace, whitespace,
or or
a a
<code>#</code> <code>#</code>
(which is the "start of comment" character). (which is the &quot;start of comment&quot; character).
</p>
<br><dt><code>SHA</code><br><dt><code>SHA1</code><br><dt><code>RMD160</code><dd>The key is a hex-encoded ASCII string of 40 characters, </dd>
<dt><code>SHA</code></dt>
<dt><code>SHA1</code></dt>
<dt><code>RMD160</code></dt>
<dd><p>The key is a hex-encoded ASCII string of 40 characters,
which is truncated as necessary. which is truncated as necessary.
</p></dd>
</dl> </dl>
<p>Note that the keys used by the <p>Note that the keys used by the
<code>ntpq(8)</code> <code>ntpq(8)</code>
and and
<code>ntpdc(8)</code> <code>ntpdc(8)</code>
programs are checked against passwords programs are checked against passwords
requested by the programs and entered by hand, requested by the programs and entered by hand,
so it is generally appropriate to specify these keys in ASCII format. so it is generally appropriate to specify these keys in ASCII format.
</p>
<p>This section was generated by <strong>AutoGen</strong>, <p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program. using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntp.keys</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;. This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Files" accesskey="1">ntp.keys Files</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Files
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-See-Also" accesskey="2">ntp.keys See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntp_002ekeys-Notes" accesskey="3">ntp.keys Notes</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Notes
</td></tr>
</table>
<ul class="menu"> <hr>
<li><a accesskey="1" href="#ntp_002ekeys-Files">ntp.keys Files</a>: Files <a name="ntp_002ekeys-Files"></a>
<li><a accesskey="2" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>: See Also <div class="header">
<li><a accesskey="3" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>: Notes <p>
</ul> Next: <a href="#ntp_002ekeys-See-Also" accesskey="n" rel="next">ntp.keys See Also</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
<div class="node">
<p><hr>
<a name="ntp_002ekeys-Files"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
<br>
</div> </div>
<a name="ntp_002ekeys-Files-1"></a>
<h4 class="subsection">ntp.keys Files</h4> <h4 class="subsection">1.1.1 ntp.keys Files</h4>
<dl compact="compact">
<dl> <dt><samp>/etc/ntp.keys</samp></dt>
<dt><span class="file">/etc/ntp.keys</span><dd>the default name of the configuration file <dd><p>the default name of the configuration file
</p></dd>
</dl> </dl>
<div class="node"> <hr>
<p><hr> <a name="ntp_002ekeys-See-Also"></a>
<a name="ntp_002ekeys-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-Files">ntp.keys Files</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a> Previous: <a href="#ntp_002ekeys-Files" accesskey="p" rel="prev">ntp.keys Files</a>, Up: <a href="#ntp_002ekeys-Notes" accesskey="u" rel="up">ntp.keys Notes</a> &nbsp; </p>
<br>
</div> </div>
<a name="ntp_002ekeys-See-Also-1"></a>
<h4 class="subsection">ntp.keys See Also</h4> <h4 class="subsection">1.1.2 ntp.keys See Also</h4>
<p><code>ntp.conf(5)</code>, <p><code>ntp.conf(5)</code>,
<code>ntpd(1ntpdmdoc)</code>, <code>ntpd(1ntpdmdoc)</code>,
<code>ntpdate(1ntpdatemdoc)</code>, <code>ntpdate(1ntpdatemdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>, <code>ntpdc(1ntpdcmdoc)</code>,
<code>sntp(1sntpmdoc)</code> <code>sntp(1sntpmdoc)</code>
<div class="node"> </p><hr>
<p><hr> <div class="header">
<a name="ntp_002ekeys-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a> &nbsp; </p>
<br>
</div> </div>
<a name="ntp_002ekeys-Notes-1"></a>
<h4 class="subsection">ntp.keys Notes</h4> <h4 class="subsection">1.1.3 ntp.keys Notes</h4>
<p>This document was derived from FreeBSD. <p>This document was derived from FreeBSD.
</p><hr>
</body></html>
</body>
</html>

View File

@ -1,8 +1,8 @@
.TH ntp.keys 5 "14 Aug 2018" "4.2.8p12" "File Formats" .TH ntp.keys 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man) .\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:28:59 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:44 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def .\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl .\" and the template file agman-file.tpl
.Sh NAME .Sh NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTP_KEYS 5 File Formats .Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10 .Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:18 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:35 AM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def .\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl .\" and the template file agmdoc-file.tpl
.Sh NAME .Sh NAME

View File

@ -2065,8 +2065,12 @@ config_auth(
#ifdef AUTOKEY #ifdef AUTOKEY
/* crypto revoke command */ /* crypto revoke command */
if (ptree->auth.revoke) if (ptree->auth.revoke > 2 && ptree->auth.revoke < 32)
sys_revoke = 1UL << ptree->auth.revoke; sys_revoke = (u_char)ptree->auth.revoke;
else if (ptree->auth.revoke)
msyslog(LOG_ERR,
"'revoke' value %d ignored",
ptree->auth.revoke);
#endif /* AUTOKEY */ #endif /* AUTOKEY */
} }
#endif /* !SIM */ #endif /* !SIM */
@ -2112,6 +2116,10 @@ config_tos_clock(
break; break;
} }
} }
if (basedate_get_day() <= NTP_TO_UNIX_DAYS)
basedate_set_day(basedate_eval_buildstamp() - 11);
return ret; return ret;
} }
@ -2194,8 +2202,8 @@ config_tos(
case T_Minsane: case T_Minsane:
val = tos->value.d; val = tos->value.d;
if ((int)tos->value.d < 1) if ((int)tos->value.d < 0)
tos->value.d = 1; tos->value.d = 0;
l_minsane = (int)tos->value.d; l_minsane = (int)tos->value.d;
break; break;
} }
@ -3813,7 +3821,12 @@ config_vars(
case T_Automax: case T_Automax:
#ifdef AUTOKEY #ifdef AUTOKEY
sys_automax = curr_var->value.i; if (curr_var->value.i > 2 && curr_var->value.i < 32)
sys_automax = (u_char)curr_var->value.i;
else
msyslog(LOG_ERR,
"'automax' value %d ignored",
curr_var->value.i);
#endif #endif
break; break;

View File

@ -1910,11 +1910,13 @@ ctl_putsys(
static struct timex ntx; static struct timex ntx;
static u_long ntp_adjtime_time; static u_long ntp_adjtime_time;
static const double to_ms = static const double to_ms_usec =
1.0e-3; /* usec to msec */
static const double to_ms_nusec =
# ifdef STA_NANO # ifdef STA_NANO
1.0e-6; /* nsec to msec */ 1.0e-6; /* nsec to msec */
# else # else
1.0e-3; /* usec to msec */ to_ms_usec;
# endif # endif
/* /*
@ -2319,7 +2321,7 @@ ctl_putsys(
case CS_K_OFFSET: case CS_K_OFFSET:
CTL_IF_KERNLOOP( CTL_IF_KERNLOOP(
ctl_putdblf, ctl_putdblf,
(sys_var[varid].text, 0, -1, to_ms * ntx.offset) (sys_var[varid].text, 0, -1, to_ms_nusec * ntx.offset)
); );
break; break;
@ -2334,7 +2336,7 @@ ctl_putsys(
CTL_IF_KERNLOOP( CTL_IF_KERNLOOP(
ctl_putdblf, ctl_putdblf,
(sys_var[varid].text, 0, 6, (sys_var[varid].text, 0, 6,
to_ms * ntx.maxerror) to_ms_usec * ntx.maxerror)
); );
break; break;
@ -2342,7 +2344,7 @@ ctl_putsys(
CTL_IF_KERNLOOP( CTL_IF_KERNLOOP(
ctl_putdblf, ctl_putdblf,
(sys_var[varid].text, 0, 6, (sys_var[varid].text, 0, 6,
to_ms * ntx.esterror) to_ms_usec * ntx.esterror)
); );
break; break;
@ -2366,7 +2368,7 @@ ctl_putsys(
CTL_IF_KERNLOOP( CTL_IF_KERNLOOP(
ctl_putdblf, ctl_putdblf,
(sys_var[varid].text, 0, 6, (sys_var[varid].text, 0, 6,
to_ms * ntx.precision) to_ms_usec * ntx.precision)
); );
break; break;
@ -2394,7 +2396,7 @@ ctl_putsys(
case CS_K_PPS_JITTER: case CS_K_PPS_JITTER:
CTL_IF_KERNPPS( CTL_IF_KERNPPS(
ctl_putdbl, ctl_putdbl,
(sys_var[varid].text, to_ms * ntx.jitter) (sys_var[varid].text, to_ms_nusec * ntx.jitter)
); );
break; break;
@ -3446,11 +3448,11 @@ write_variables(
* Look through the variables. Dump out at the first sign of * Look through the variables. Dump out at the first sign of
* trouble. * trouble.
*/ */
while ((v = ctl_getitem(sys_var, &valuep)) != 0) { while ((v = ctl_getitem(sys_var, &valuep)) != NULL) {
ext_var = 0; ext_var = 0;
if (v->flags & EOV) { if (v->flags & EOV) {
if ((v = ctl_getitem(ext_sys_var, &valuep)) != v = ctl_getitem(ext_sys_var, &valuep);
0) { if (v != NULL) {
if (v->flags & EOV) { if (v->flags & EOV) {
ctl_error(CERR_UNKNOWNVAR); ctl_error(CERR_UNKNOWNVAR);
return; return;
@ -3464,15 +3466,23 @@ write_variables(
ctl_error(CERR_PERMISSION); ctl_error(CERR_PERMISSION);
return; return;
} }
if (!ext_var && (*valuep == '\0' || !atoint(valuep, /* [bug 3565] writing makes sense only if we *have* a
&val))) { * value in the packet!
*/
if (valuep == NULL) {
ctl_error(CERR_BADFMT); ctl_error(CERR_BADFMT);
return; return;
} }
if (!ext_var && (val & ~LEAP_NOTINSYNC) != 0) { if (!ext_var) {
if ( !(*valuep && atoint(valuep, &val))) {
ctl_error(CERR_BADFMT);
return;
}
if ((val & ~LEAP_NOTINSYNC) != 0) {
ctl_error(CERR_BADVALUE); ctl_error(CERR_BADVALUE);
return; return;
} }
}
if (ext_var) { if (ext_var) {
octets = strlen(v->text) + strlen(valuep) + 2; octets = strlen(v->text) + strlen(valuep) + 2;

View File

@ -353,8 +353,8 @@ make_keylist(
* included in the hash is zero if broadcast mode, the peer * included in the hash is zero if broadcast mode, the peer
* cookie if client mode or the host cookie if symmetric modes. * cookie if client mode or the host cookie if symmetric modes.
*/ */
mpoll = 1 << min(peer->ppoll, peer->hpoll); mpoll = 1U << min(peer->ppoll, peer->hpoll);
lifetime = min(1U << sys_automax, NTP_MAXSESSION * mpoll); lifetime = min((1UL << sys_automax), NTP_MAXSESSION * mpoll);
if (peer->hmode == MODE_BROADCAST) if (peer->hmode == MODE_BROADCAST)
cookie = 0; cookie = 0;
else else
@ -1486,7 +1486,8 @@ crypto_verify(
return (XEVNT_LEN); return (XEVNT_LEN);
i = (vallen + 3) / 4; i = (vallen + 3) / 4;
siglen = ntohl(ep->pkt[i++]); siglen = ntohl(ep->pkt[i]);
++i;
if ( siglen > MAX_VALLEN if ( siglen > MAX_VALLEN
|| len - VALUE_LEN < ((vallen + 3) / 4) * 4 || len - VALUE_LEN < ((vallen + 3) / 4) * 4
|| len - VALUE_LEN - ((vallen + 3) / 4) * 4 || len - VALUE_LEN - ((vallen + 3) / 4) * 4

View File

@ -246,6 +246,10 @@ ntp_adjtime_error_handler(
) )
{ {
char des[1024] = ""; /* Decoded Error Status */ char des[1024] = ""; /* Decoded Error Status */
char *dbp, *ebp;
dbp = des;
ebp = dbp + sizeof(des);
switch (ret) { switch (ret) {
case -1: case -1:
@ -363,37 +367,37 @@ or, from ntp_adjtime():
/* error (see status word) */ /* error (see status word) */
if (ptimex->status & STA_UNSYNC) if (ptimex->status & STA_UNSYNC)
snprintf(des, sizeof(des), "%s%sClock Unsynchronized", xsbprintf(&dbp, ebp, "%sClock Unsynchronized",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if (ptimex->status & STA_CLOCKERR) if (ptimex->status & STA_CLOCKERR)
snprintf(des, sizeof(des), "%s%sClock Error", xsbprintf(&dbp, ebp, "%sClock Error",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL) if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSFREQ) && ptimex->status & STA_PPSFREQ)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but no PPS", xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but no PPS",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL) if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSTIME) && ptimex->status & STA_PPSTIME)
snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but no PPS signal", xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but no PPS signal",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if ( ptimex->status & STA_PPSTIME if ( ptimex->status & STA_PPSTIME
&& ptimex->status & STA_PPSJITTER) && ptimex->status & STA_PPSJITTER)
snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but PPS Jitter exceeded", xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but PPS Jitter exceeded",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSWANDER) && ptimex->status & STA_PPSWANDER)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but PPS Wander exceeded", xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but PPS Wander exceeded",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSERROR) && ptimex->status & STA_PPSERROR)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but Calibration error detected", xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but Calibration error detected",
des, (*des) ? "; " : ""); (*des) ? "; " : "");
if (pps_call && !(ptimex->status & STA_PPSSIGNAL)) if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL, report_event(EVNT_KERN, NULL,

View File

@ -387,9 +387,9 @@ transmit(
*/ */
if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) { if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
peer->outdate = current_time; peer->outdate = current_time;
poll_update(peer, hpoll);
if (sys_leap != LEAP_NOTINSYNC) if (sys_leap != LEAP_NOTINSYNC)
peer_xmit(peer); peer_xmit(peer);
poll_update(peer, hpoll);
return; return;
} }
@ -408,6 +408,7 @@ transmit(
*/ */
if (peer->cast_flags & MDF_ACAST) { if (peer->cast_flags & MDF_ACAST) {
peer->outdate = current_time; peer->outdate = current_time;
poll_update(peer, hpoll);
if (peer->unreach > sys_beacon) { if (peer->unreach > sys_beacon) {
peer->unreach = 0; peer->unreach = 0;
peer->ttl = 0; peer->ttl = 0;
@ -419,7 +420,6 @@ transmit(
peer_xmit(peer); peer_xmit(peer);
} }
peer->unreach++; peer->unreach++;
poll_update(peer, hpoll);
return; return;
} }
@ -437,11 +437,11 @@ transmit(
*/ */
if (peer->cast_flags & MDF_POOL) { if (peer->cast_flags & MDF_POOL) {
peer->outdate = current_time; peer->outdate = current_time;
poll_update(peer, hpoll);
if ( (peer_associations <= 2 * sys_maxclock) if ( (peer_associations <= 2 * sys_maxclock)
&& ( peer_associations < sys_maxclock && ( peer_associations < sys_maxclock
|| sys_survivors < sys_minclock)) || sys_survivors < sys_minclock))
pool_xmit(peer); pool_xmit(peer);
poll_update(peer, hpoll);
return; return;
} }
@ -549,9 +549,9 @@ transmit(
/* /*
* Do not transmit if in broadcast client mode. * Do not transmit if in broadcast client mode.
*/ */
poll_update(peer, hpoll);
if (peer->hmode != MODE_BCLIENT) if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer); peer_xmit(peer);
poll_update(peer, hpoll);
return; return;
} }

View File

@ -2536,7 +2536,15 @@ get_clock_info(
DTOLFP(clock_stat.fudgetime2, &ltmp); DTOLFP(clock_stat.fudgetime2, &ltmp);
HTONL_FP(&ltmp, &ic->fudgetime2); HTONL_FP(&ltmp, &ic->fudgetime2);
ic->fudgeval1 = htonl((u_int32)clock_stat.fudgeval1); ic->fudgeval1 = htonl((u_int32)clock_stat.fudgeval1);
/* [Bug3527] Backward Incompatible: ic->fudgeval2 is
* a string, instantiated via memcpy() so there is no
* endian issue to correct.
*/
#ifdef DISABLE_BUG3527_FIX
ic->fudgeval2 = htonl(clock_stat.fudgeval2); ic->fudgeval2 = htonl(clock_stat.fudgeval2);
#else
ic->fudgeval2 = clock_stat.fudgeval2;
#endif
free_varlist(clock_stat.kv_list); free_varlist(clock_stat.kv_list);

View File

@ -82,8 +82,8 @@ u_long orphwait; /* orphan wait time */
#ifdef AUTOKEY #ifdef AUTOKEY
static u_long revoke_timer; /* keys revoke timer */ static u_long revoke_timer; /* keys revoke timer */
static u_long keys_timer; /* session key timer */ static u_long keys_timer; /* session key timer */
u_long sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */ u_char sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
u_long sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */ u_char sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
#endif /* AUTOKEY */ #endif /* AUTOKEY */
/* /*
@ -404,7 +404,7 @@ timer(void)
* Garbage collect expired keys. * Garbage collect expired keys.
*/ */
if (keys_timer <= current_time) { if (keys_timer <= current_time) {
keys_timer += 1 << sys_automax; keys_timer += (1UL << sys_automax);
auth_agekeys(); auth_agekeys();
} }
@ -413,7 +413,7 @@ timer(void)
* to regenerate cookies. * to regenerate cookies.
*/ */
if (revoke_timer && revoke_timer <= current_time) { if (revoke_timer && revoke_timer <= current_time) {
revoke_timer += 1 << sys_revoke; revoke_timer += (1UL << sys_revoke);
RAND_bytes((u_char *)&sys_private, 4); RAND_bytes((u_char *)&sys_private, 4);
} }
#endif /* AUTOKEY */ #endif /* AUTOKEY */

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c) * EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
* *
* It has been AutoGen-ed August 14, 2018 at 08:27:45 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def * From the definitions ntpd-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This source file is not encumbered * AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -75,7 +75,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpd options * static const strings for ntpd options
*/ */
static char const ntpd_opt_strs[3132] = static char const ntpd_opt_strs[3132] =
/* 0 */ "ntpd 4.2.8p12\n" /* 0 */ "ntpd 4.2.8p13\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n" "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n" "This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n" "redistribution under the terms of the NTP License, copies of which\n"
@ -205,12 +205,12 @@ static char const ntpd_opt_strs[3132] =
/* 2901 */ "output version information and exit\0" /* 2901 */ "output version information and exit\0"
/* 2937 */ "version\0" /* 2937 */ "version\0"
/* 2945 */ "NTPD\0" /* 2945 */ "NTPD\0"
/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p12\n" /* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0" "\t\t[ <server1> ... <serverN> ]\n\0"
/* 3082 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 3082 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3116 */ "\n\0" /* 3116 */ "\n\0"
/* 3118 */ "ntpd 4.2.8p12"; /* 3118 */ "ntpd 4.2.8p13";
/** /**
* ipv4 option description with * ipv4 option description with
@ -1529,7 +1529,7 @@ static void bogus_function(void) {
translate option names. translate option names.
*/ */
/* referenced via ntpdOptions.pzCopyright */ /* referenced via ntpdOptions.pzCopyright */
puts(_("ntpd 4.2.8p12\n\ puts(_("ntpd 4.2.8p13\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\ Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\ This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\ redistribution under the terms of the NTP License, copies of which\n\
@ -1670,7 +1670,7 @@ implied warranty.\n"));
puts(_("output version information and exit")); puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */ /* referenced via ntpdOptions.pzUsageTitle */
puts(_("ntpd - NTP daemon program - Ver. 4.2.8p12\n\ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p13\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n")); \t\t[ <server1> ... <serverN> ]\n"));
@ -1678,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n")); puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */ /* referenced via ntpdOptions.pzFullVersion */
puts(_("ntpd 4.2.8p12")); puts(_("ntpd 4.2.8p13"));
/* referenced via ntpdOptions.pzFullUsage */ /* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>")); puts(_("<<<NOT-FOUND>>>"));

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h) * EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
* *
* It has been AutoGen-ed August 14, 2018 at 08:27:44 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:15 AM by AutoGen 5.18.5
* From the definitions ntpd-opts.def * From the definitions ntpd-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This header file is not encumbered * AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -53,7 +53,7 @@
* tolerable version is at least as old as what was current when the header * tolerable version is at least as old as what was current when the header
* template was released. * template was released.
*/ */
#define AO_TEMPLATE_VERSION 167936 #define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header # error option template version mismatches autoopts/options.h header
@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */ /** count of all options for ntpd */
#define OPTION_CT 38 #define OPTION_CT 38
/** ntpd version */ /** ntpd version */
#define NTPD_VERSION "4.2.8p12" #define NTPD_VERSION "4.2.8p13"
/** Full ntpd version text */ /** Full ntpd version text */
#define NTPD_FULL_VERSION "ntpd 4.2.8p12" #define NTPD_FULL_VERSION "ntpd 4.2.8p13"
/** /**
* Interface defines for all options. Replace "n" with the UPPER_CASED * Interface defines for all options. Replace "n" with the UPPER_CASED

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpd 1ntpdman "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpd 1ntpdman "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jbaWTB/ag-ubaOSB) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:02 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def .\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPD 1ntpdmdoc User Commands .Dt NTPD 1ntpdmdoc User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:20 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def .\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -534,6 +534,7 @@ set_process_priority(void)
* Detach from terminal (much like daemon()) * Detach from terminal (much like daemon())
* Nothe that this function calls exit() * Nothe that this function calls exit()
*/ */
# ifdef HAVE_WORKING_FORK
static void static void
detach_from_terminal( detach_from_terminal(
int pipe_fds[2], int pipe_fds[2],
@ -617,6 +618,7 @@ detach_from_terminal(
return; return;
} }
# endif /* HAVE_WORKING_FORK */
#ifdef HAVE_DROPROOT #ifdef HAVE_DROPROOT
/* /*
@ -665,8 +667,7 @@ map_user(
* Map group name/number to group ID * Map group name/number to group ID
*/ */
static int static int
map_group( map_group(void)
)
{ {
char *endp; char *endp;
@ -688,24 +689,9 @@ map_group(
return 1; return 1;
} }
/* static int
* Change (effective) user and group IDs, also initialize the supplementary group access list set_group_ids(void)
*/
int
set_user_group_ids(
)
{ {
/* If the the user was already mapped, no need to map it again */
if ((NULL != user) && (0 == sw_uid)) {
if (0 == map_user())
exit (-1);
}
/* same applies for the group */
if ((NULL != group) && (0 == sw_gid)) {
if (0 == map_group())
exit (-1);
}
if (user && initgroups(user, sw_gid)) { if (user && initgroups(user, sw_gid)) {
msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user); msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
return 0; return 0;
@ -729,6 +715,12 @@ set_user_group_ids(
msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid); msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
return 0; return 0;
} }
return 1;
}
static int
set_user_ids(void)
{
if (user && setuid(sw_uid)) { if (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user); msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
return 0; return 0;
@ -737,6 +729,31 @@ set_user_group_ids(
msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user); msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
return 0; return 0;
} }
return 1;
}
/*
* Change (effective) user and group IDs, also initialize the supplementary group access list
*/
int set_user_group_ids(void);
int
set_user_group_ids(void)
{
/* If the the user was already mapped, no need to map it again */
if ((NULL != user) && (0 == sw_uid)) {
if (0 == map_user())
exit (-1);
}
/* same applies for the group */
if ((NULL != group) && (0 == sw_gid)) {
if (0 == map_group())
exit (-1);
}
if (getegid() != sw_gid && 0 == set_group_ids())
return 0;
if (geteuid() != sw_uid && 0 == set_user_ids())
return 0;
return 1; return 1;
} }

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpd @NTPD_MS@ "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpd @NTPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-jbaWTB/ag-ubaOSB) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:02 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:46 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def .\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPD @NTPD_MS@ User Commands .Dt NTPD @NTPD_MS@ User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:20 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:37 AM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def .\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -60,6 +60,9 @@
#include <stdio.h> #include <stdio.h>
#include <syslog.h> #include <syslog.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
struct btfp_time /* Structure for reading 5 time words */ struct btfp_time /* Structure for reading 5 time words */
/* in one ioctl(2) operation. */ /* in one ioctl(2) operation. */
@ -80,11 +83,10 @@ struct btfp_time /* Structure for reading 5 time words */
/***** Compound ioctl commands *****/ /***** Compound ioctl commands *****/
/* Read all 5 time words in one call. */ /* Read all 5 time words in one call. */
#define READTIME IOCIORN(b, 32, sizeof( struct btfp_time ))
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#undef READTIME # define READTIME _IOR('u', 5, struct btfp_time )
#define READTIME _IOR('u', 5, struct btfp_time ) #else
# define READTIME IOCIORN(b, 32, sizeof( struct btfp_time ))
#endif #endif
/* Solaris specific section */ /* Solaris specific section */
@ -165,18 +167,76 @@ static void vme_poll (int unit, struct peer *);
struct vmedate *get_datumtime(struct vmedate *); struct vmedate *get_datumtime(struct vmedate *);
void tvme_fill(struct vmedate *, uint32_t btm[2]); void tvme_fill(struct vmedate *, uint32_t btm[2]);
void stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp); void stfp_time2tvme(struct vmedate *time_vme, struct stfp_time *stfp);
inline const char *DEVICE_NAME(int n); static const char *get_devicename(int n);
/* [Bug 3558] and [Bug 1674] perlinger@ntp.org says:
*
* bcReadBinTime() is defined to use two DWORD pointers on Windows and
* Linux in the BANCOMM SDK. DWORD is of course Windows-specific
* (*shudder*), and it is defined as 'unsigned long' under
* Linux/Unix. (*sigh*)
*
* This creates quite some headache. The size of 'unsigned long' is
* platform/compiler/memory-model dependent (LP32 vs LP64 vs LLP64),
* while the card itself always creates 32bit time stamps. What a
* bummer. And DWORD has tendency to contain 64bit on Win64 (which is
* why we have a DWORD32 defined on Win64) so it can be used as
* substitute for 'UINT_PTR' in Windows API headers. I won't even try
* to comment on that, because anything I have to say will not be civil.
*
* We work around this by possibly using a wrapper function that makes
* the necessary conversions/casts. It might be a bit tricky to
* maintain the conditional logic below, but any lingering disease needs
* constant care to avoid a breakout.
*/
#if defined(__linux__)
typedef unsigned long bcBinTimeT;
# if SIZEOF_LONG == 4
# define safeReadBinTime bcReadBinTime
# endif
#elif defined(SYS_WINNT)
typedef DWORD bcBinTimeT;
# if !defined(_WIN64) || _WIN64 == 0
# define safeReadBinTime bcReadBinTime
# endif
#else
typedef uint32_t bcBinTimeT;
# define safeReadBinTime bcReadBinTime
#endif
/* /*
* Define the bc*() functions as weak so we can compile/link without them. * Define the bc*() functions as weak so we can compile/link without them.
* Only clients with the card will have the proprietary vendor device driver * Only clients with the card will have the proprietary vendor device driver
* and interface library needed for use on Linux/Windows platforms. * and interface library needed for use on Linux/Windows platforms.
*/ */
extern uint32_t __attribute__ ((weak)) bcReadBinTime(SYMMT_PCI_HANDLE, uint32_t *, uint32_t*, uint8_t*); extern uint32_t __attribute__ ((weak)) bcReadBinTime(SYMMT_PCI_HANDLE, bcBinTimeT*, bcBinTimeT*, uint8_t*);
extern SYMMT_PCI_HANDLE __attribute__ ((weak)) bcStartPci(void); extern SYMMT_PCI_HANDLE __attribute__ ((weak)) bcStartPci(void);
extern void __attribute__ ((weak)) bcStopPci(SYMMT_PCI_HANDLE); extern void __attribute__ ((weak)) bcStopPci(SYMMT_PCI_HANDLE);
/* This is the conversion wrapper for the long/DWORD/uint32_t clash in
* reading binary times.
*/
#ifndef safeReadBinTime
static uint32_t
safeReadBinTime(
SYMMT_PCI_HANDLE hnd,
uint32_t *pt1,
uint32_t *pt2,
uint8_t *p3
)
{
bcBinTimeT t1, t2;
uint32_t rc;
rc = bcReadBinTime(hnd, &t1, &t2, p3);
if (rc != 0) {
*pt1 = (uint32_t)t1;
*pt2 = (uint32_t)t2;
}
return rc;
}
#endif /* !defined(safeReadBinTime) */
/* /*
* Transfer vector * Transfer vector
*/ */
@ -195,15 +255,27 @@ int regvalue;
int tfp_type; /* mode selector, indicate platform and driver interface */ int tfp_type; /* mode selector, indicate platform and driver interface */
SYMMT_PCI_HANDLE stfp_handle; SYMMT_PCI_HANDLE stfp_handle;
/** /* This helper function returns the device name based on the platform we
* this macro returns the device name based on * are running on and the device number.
* the platform we are running on and the device number *
* Uses a static buffer, so the result is valid only to the next call of
* this function!
*/ */
#if defined(__sun__) static const char*
inline const char *DEVICE_NAME(int n) {static char s[20]={0}; snprintf(s,19,"/dev/stfp%d",n);return s;} get_devicename(int n)
#else {
inline const char* DEVICE_NAME(int n) {static char s[20]={0}; snprintf(s,19,"/dev/btfp%d",n);return s;}
#endif /**__sun__**/ # if defined(__sun__)
static const char * const template ="/dev/stfp%d";
# else
static const char * const template ="/dev/btfp%d";
# endif
static char namebuf[20];
snprintf(namebuf, sizeof(namebuf), template, n);
namebuf[sizeof(namebuf)-1] = '\0'; /* paranoia rulez! */
return namebuf;
}
/* /*
* vme_start - open the VME device and initialize data for processing * vme_start - open the VME device and initialize data for processing
@ -235,9 +307,9 @@ vme_start(
*/ */
#ifdef DEBUG #ifdef DEBUG
printf("Opening DATUM DEVICE %s\n",DEVICE_NAME(peer->refclkunit)); printf("Opening DATUM DEVICE %s\n",get_devicename(peer->refclkunit));
#endif #endif
if ( (fd_vme = open(DEVICE_NAME(peer->refclkunit), O_RDWR)) < 0) { if ( (fd_vme = open(get_devicename(peer->refclkunit), O_RDWR)) < 0) {
msyslog(LOG_ERR, "vme_start: failed open of %s: %m", vmedev); msyslog(LOG_ERR, "vme_start: failed open of %s: %m", vmedev);
return (0); return (0);
} }
@ -433,7 +505,7 @@ get_datumtime(struct vmedate *time_vme)
break; break;
case 2: /* Linux/Windows, PCI, 2 32bit time words */ case 2: /* Linux/Windows, PCI, 2 32bit time words */
if (bcReadBinTime(stfp_handle, &btm[1], &btm[0], &dmy) == 0) { if (safeReadBinTime(stfp_handle, &btm[1], &btm[0], &dmy) == 0) {
msyslog(LOG_ERR, "get_datumtime error: %m"); msyslog(LOG_ERR, "get_datumtime error: %m");
return(NULL); return(NULL);
} }
@ -512,10 +584,11 @@ void
tvme_fill(struct vmedate *time_vme, uint32_t btm[2]) tvme_fill(struct vmedate *time_vme, uint32_t btm[2])
{ {
struct tm maj; struct tm maj;
uint32_t dmaj, dmin; time_t dmaj;
uint32_t dmin;
dmaj = btm[1]; /* syntax sugar */ dmaj = btm[1]; /* syntax sugar & expansion */
dmin = btm[0]; dmin = btm[0]; /* just syntax sugar */
gmtime_r(&dmaj, &maj); gmtime_r(&dmaj, &maj);
time_vme->day = maj.tm_yday+1; time_vme->day = maj.tm_yday+1;

View File

@ -158,10 +158,6 @@ static char * jupiter_send (struct instance *, struct jheader *);
static void jupiter_shutdown(int, struct peer *); static void jupiter_shutdown(int, struct peer *);
static int jupiter_start (int, struct peer *); static int jupiter_start (int, struct peer *);
static u_int get_full_week(u_int base_week, u_int gpos_week);
static u_int get_base_week(void);
/* /*
* Transfer vector * Transfer vector
*/ */
@ -855,8 +851,7 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
} }
instance->gpos_sweek = DS2UI(jg->sweek); instance->gpos_sweek = DS2UI(jg->sweek);
instance->gpos_gweek = get_full_week(get_base_week(), instance->gpos_gweek = basedate_expand_gpsweek(getshort(jg->gweek));
getshort(jg->gweek));
/* according to the protocol spec, the seconds-in-week cannot /* according to the protocol spec, the seconds-in-week cannot
* exceed the nominal value: Is it really necessary to normalise * exceed the nominal value: Is it really necessary to normalise
@ -1129,56 +1124,6 @@ jupiter_recv(struct instance *instance)
return (cc); return (cc);
} }
static u_int
get_base_week(void)
{
static int init_done /* = 0 */;
static u_int base_week;
/* Get the build date, convert to days since GPS epoch and
* finally weeks since GPS epoch. Note that the build stamp is
* trusted once it is fetched -- only dates before the GPS epoch
* are not permitted. This will permit proper synchronisation
* for a time range of 1024 weeks starting with 00:00:00 of the
* last Sunday on or before the build time.
*
* If the impossible happens and fetching the build date fails,
* a 1024-week cycle starting with 2016-01-03 is assumed to
* avoid catastropic errors. This will work until 2035-08-19.
*/
if (!init_done) {
struct calendar bd;
if (ntpcal_get_build_date(&bd)) {
int32_t days = ntpcal_date_to_rd(&bd);
if (days > RDN_GPS_EPOCH)
days -= RDN_GPS_EPOCH;
else
days = 0;
base_week = days / 7;
} else {
base_week = 1878; /* 2016-01-03, Sunday */
msyslog(LOG_ERR,
"refclock_jupiter: ntpcal_get_build_date() failed: %s",
"using 2016-01-03 as GPS base!");
}
init_done = 1;
}
return base_week;
}
static u_int
get_full_week(
u_int base_week,
u_int gpos_week
)
{
/* Periodic extension on base week. Since the period is 1024
* weeks and we do unsigned arithmetic here, we can do wonderful
* things with masks and the well-defined overflow behaviour.
*/
return base_week + ((gpos_week - base_week) & 1023);
}
#else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */ #else /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */
int refclock_jupiter_bs; int refclock_jupiter_bs;
#endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */ #endif /* not (REFCLOCK && CLOCK_JUPITER && HAVE_PPSAPI) */

View File

@ -4256,8 +4256,7 @@ mk_utcinfo(
struct tm *tm; struct tm *tm;
int nc; int nc;
if (wnlsf < GPSWRAP) wnlsf = basedate_expand_gpsweek(wnlsf);
wnlsf += GPSWEEKS;
/* 'wnt' not used here: would need the same treatment as 'wnlsf */ /* 'wnt' not used here: would need the same treatment as 'wnlsf */
t_ls = (time_t) wnlsf * SECSPERWEEK t_ls = (time_t) wnlsf * SECSPERWEEK

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -2176,6 +2176,7 @@ print_server(
str, fptoa((s_fp)pp->rootdelay, 6), str, fptoa((s_fp)pp->rootdelay, 6),
ufptoa(pp->rootdisp, 6)); ufptoa(pp->rootdisp, 6));
if (pp->xmtcnt != pp->filter_nextpt)
(void) fprintf(fp, "transmitted %d, in filter %d\n", (void) fprintf(fp, "transmitted %d, in filter %d\n",
pp->xmtcnt, pp->filter_nextpt); pp->xmtcnt, pp->filter_nextpt);
@ -2189,22 +2190,24 @@ print_server(
if (sys_samples > 1) { if (sys_samples > 1) {
(void) fprintf(fp, "filter delay: "); (void) fprintf(fp, "filter delay: ");
for (i = 0; i < NTP_SHIFT; i++) { for (i = 0; i < NTP_SHIFT; i++) {
(void) fprintf(fp, " %-8.8s", fptoa(pp->filter_delay[i], 5)); if (i == (NTP_SHIFT>>1))
if (i == (NTP_SHIFT>>1)-1)
(void) fprintf(fp, "\n "); (void) fprintf(fp, "\n ");
(void) fprintf(fp, " %-10.10s",
(i<sys_samples ? fptoa(pp->filter_delay[i], 5) : "----"));
} }
(void) fprintf(fp, "\n"); (void) fprintf(fp, "\n");
(void) fprintf(fp, "filter offset:"); (void) fprintf(fp, "filter offset:");
for (i = 0; i < PEER_SHIFT; i++) { for (i = 0; i < PEER_SHIFT; i++) {
(void) fprintf(fp, " %-8.8s", lfptoa(&pp->filter_offset[i], 6)); if (i == (PEER_SHIFT>>1))
if (i == (PEER_SHIFT>>1)-1)
(void) fprintf(fp, "\n "); (void) fprintf(fp, "\n ");
(void) fprintf(fp, " %-10.10s",
(i<sys_samples ? lfptoa(&pp->filter_offset[i], 6): "----"));
} }
(void) fprintf(fp, "\n"); (void) fprintf(fp, "\n");
} }
(void) fprintf(fp, "delay %s, dispersion %s\n", (void) fprintf(fp, "delay %s, dispersion %s, ",
fptoa((s_fp)pp->delay, 5), ufptoa(pp->dispersion, 5)); fptoa((s_fp)pp->delay, 5), ufptoa(pp->dispersion, 5));
(void) fprintf(fp, "offset %s\n\n", (void) fprintf(fp, "offset %s\n\n",

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:29:40 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:56:51 AM by AutoGen 5.18.5
# From the definitions ntpdc-opts.def # From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl # and the template file agtexi-cmd.tpl
@end ignore @end ignore
@ -76,7 +76,7 @@ with a status code of 0.
@exampleindent 0 @exampleindent 0
@example @example
ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p12 ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...] Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution -4 no ipv4 Force IPv4 DNS name resolution

View File

@ -1,4 +1,4 @@
#! /usr/local/bin/perl -w #! /ntpbuild/bin/perl -w
$found = 0; $found = 0;
$last = 0; $last = 0;

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c) * EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
* *
* It has been AutoGen-ed August 14, 2018 at 08:29:29 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:48 AM by AutoGen 5.18.5
* From the definitions ntpdc-opts.def * From the definitions ntpdc-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This source file is not encumbered * AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -69,7 +69,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpdc options * static const strings for ntpdc options
*/ */
static char const ntpdc_opt_strs[1914] = static char const ntpdc_opt_strs[1914] =
/* 0 */ "ntpdc 4.2.8p12\n" /* 0 */ "ntpdc 4.2.8p13\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n" "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n" "This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n" "redistribution under the terms of the NTP License, copies of which\n"
@ -128,14 +128,14 @@ static char const ntpdc_opt_strs[1914] =
/* 1695 */ "no-load-opts\0" /* 1695 */ "no-load-opts\0"
/* 1708 */ "no\0" /* 1708 */ "no\0"
/* 1711 */ "NTPDC\0" /* 1711 */ "NTPDC\0"
/* 1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p12\n" /* 1717 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1848 */ "$HOME\0" /* 1848 */ "$HOME\0"
/* 1854 */ ".\0" /* 1854 */ ".\0"
/* 1856 */ ".ntprc\0" /* 1856 */ ".ntprc\0"
/* 1863 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 1863 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1897 */ "\n\0" /* 1897 */ "\n\0"
/* 1899 */ "ntpdc 4.2.8p12"; /* 1899 */ "ntpdc 4.2.8p13";
/** /**
* ipv4 option description with * ipv4 option description with
@ -796,7 +796,7 @@ static void bogus_function(void) {
translate option names. translate option names.
*/ */
/* referenced via ntpdcOptions.pzCopyright */ /* referenced via ntpdcOptions.pzCopyright */
puts(_("ntpdc 4.2.8p12\n\ puts(_("ntpdc 4.2.8p13\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\ Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\ This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\ redistribution under the terms of the NTP License, copies of which\n\
@ -862,14 +862,14 @@ implied warranty.\n"));
puts(_("load options from a config file")); puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */ /* referenced via ntpdcOptions.pzUsageTitle */
puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p12\n\ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n")); Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */ /* referenced via ntpdcOptions.pzExplain */
puts(_("\n")); puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */ /* referenced via ntpdcOptions.pzFullVersion */
puts(_("ntpdc 4.2.8p12")); puts(_("ntpdc 4.2.8p13"));
/* referenced via ntpdcOptions.pzFullUsage */ /* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>")); puts(_("<<<NOT-FOUND>>>"));

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h) * EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
* *
* It has been AutoGen-ed August 14, 2018 at 08:29:28 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:48 AM by AutoGen 5.18.5
* From the definitions ntpdc-opts.def * From the definitions ntpdc-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This header file is not encumbered * AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -53,7 +53,7 @@
* tolerable version is at least as old as what was current when the header * tolerable version is at least as old as what was current when the header
* template was released. * template was released.
*/ */
#define AO_TEMPLATE_VERSION 167936 #define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header # error option template version mismatches autoopts/options.h header
@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpdc */ /** count of all options for ntpdc */
#define OPTION_CT 15 #define OPTION_CT 15
/** ntpdc version */ /** ntpdc version */
#define NTPDC_VERSION "4.2.8p12" #define NTPDC_VERSION "4.2.8p13"
/** Full ntpdc version text */ /** Full ntpdc version text */
#define NTPDC_FULL_VERSION "ntpdc 4.2.8p12" #define NTPDC_FULL_VERSION "ntpdc 4.2.8p13"
/** /**
* Interface defines for all options. Replace "n" with the UPPER_CASED * Interface defines for all options. Replace "n" with the UPPER_CASED

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpdc 1ntpdcman "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpdc 1ntpdcman "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-uwaqJD/ag-GwaiID) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:36 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:53 AM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def .\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPDC 1ntpdcmdoc User Commands .Dt NTPDC 1ntpdcmdoc User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:43 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:50 AM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def .\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -1,98 +1,144 @@
<html lang="en"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head> <head>
<title>ntpdc: NTPD Control User's Manual</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html"> <title>ntpdc: NTPD Control User&rsquo;s Manual</title>
<meta name="description" content="ntpdc: NTPD Control User's Manual">
<meta name="generator" content="makeinfo 4.7"> <meta name="description" content="ntpdc: NTPD Control User&rsquo;s Manual">
<link title="Top" rel="top" href="#Top"> <meta name="keywords" content="ntpdc: NTPD Control User&rsquo;s Manual">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta name="resource-type" content="document">
<meta http-equiv="Content-Style-Type" content="text/css"> <meta name="distribution" content="global">
<style type="text/css"><!-- <meta name="Generator" content="makeinfo">
pre.display { font-family:inherit } <link href="#Top" rel="start" title="Top">
pre.format { font-family:inherit } <link href="dir.html#Top" rel="up" title="(dir)">
pre.smalldisplay { font-family:inherit; font-size:smaller } <style type="text/css">
pre.smallformat { font-family:inherit; font-size:smaller } <!--
pre.smallexample { font-size:smaller } a.summary-letter {text-decoration: none}
pre.smalllisp { font-size:smaller } blockquote.indentedblock {margin-right: 0em}
span.sc { font-variant:small-caps } blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
span.roman { font-family: serif; font-weight: normal; } blockquote.smallquotation {font-size: smaller}
--></style> div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head> </head>
<body>
<h1 class="settitle">ntpdc: NTPD Control User's Manual</h1> <body lang="en">
<div class="node"> <h1 class="settitle" align="center">ntpdc: NTPD Control User&rsquo;s Manual</h1>
<p><hr>
<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Description">ntpdc Description</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<br>
<a name="Top"></a>
<div class="header">
<p>
Next: <a href="#ntpdc-Description" accesskey="n" rel="next">ntpdc Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
</div> </div>
<a name="ntpdc_003a-NTPD-Control-User-Manual"></a>
<h1 class="top">ntpdc: NTPD Control User Manual</h1>
<h2 class="unnumbered">ntpdc: NTPD Control User Manual</h2> <p>This document describes the use of the NTP Project&rsquo;s <code>ntpdc</code> program,
<p>This document describes the use of the NTP Project's <code>ntpdc</code> program,
that can be used to query a Network Time Protocol (NTP) server and that can be used to query a Network Time Protocol (NTP) server and
display the time offset of the system clock relative to the server display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job. well. It can be run as an interactive command or from a cron job.
</p>
<p>This document applies to version 4.2.8p12 of <code>ntpdc</code>. <p>This document applies to version 4.2.8p13 of <code>ntpdc</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4 <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification. IETF specification.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents"> <div class="shortcontents">
<h2>Short Contents</h2> <ul class="no-bullet">
<ul> <li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
<a href="#Top">ntpdc: NTPD Control User Manual</a>
</ul> </ul>
</div> </div>
<ul class="menu">
<li><a accesskey="1" href="#ntpdc-Description">ntpdc Description</a>: Description
<li><a accesskey="2" href="#ntpdc-Invocation">ntpdc Invocation</a>: Invoking ntpdc
<li><a accesskey="3" href="#Usage">Usage</a>: Usage
</ul>
<div class="node"> <table class="menu" border="0" cellspacing="0">
<p><hr> <tr><td align="left" valign="top">&bull; <a href="#ntpdc-Description" accesskey="1">ntpdc Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="2">ntpdc Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpdc
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<hr>
<a name="ntpdc-Description"></a> <a name="ntpdc-Description"></a>
<br> <div class="header">
<p>
Next: <a href="#ntpdc-Invocation" accesskey="n" rel="next">ntpdc Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div> </div>
<a name="Description"></a>
<!-- node-name, next, previous, up --> <h2 class="chapter">1 Description</h2>
<h3 class="section">Description</h3>
<p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the <p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the
standard output in the format: standard output in the format:
</p>
<div class="example">
<pre class="example">1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
</pre></div>
<pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs <p>where
</pre>
<p>where
YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time, YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC), (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
and and
the +4.567 +/- 0.089 secs indicates the time offset and the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock. error bound of the system clock relative to the server clock.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Invocation" accesskey="1">ntpdc Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<div class="node"> <hr>
<p><hr>
<a name="ntpdc-Invocation"></a> <a name="ntpdc-Invocation"></a>
<br> <div class="header">
<p>
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#ntpdc-Description" accesskey="p" rel="prev">ntpdc Description</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div> </div>
<a name="Invoking-ntpdc"></a>
<h3 class="section">1.1 Invoking ntpdc</h3>
<a name="index-ntpdc"></a>
<a name="index-vendor_002dspecific-NTPD-control-program"></a>
<h3 class="section">Invoking ntpdc</h3>
<p><a name="index-ntpdc-1"></a><a name="index-vendor_002dspecific-NTPD-control-program-2"></a>
<p><code>ntpdc</code> <p><code>ntpdc</code>
is deprecated. is deprecated.
Please use Please use
<code>ntpq(1ntpqmdoc)</code> instead - it can do everything <code>ntpq(1ntpqmdoc)</code> instead - it can do everything
<code>ntpdc</code> <code>ntpdc</code>
used to do, and it does so using a much more sane interface. used to do, and it does so using a much more sane interface.
</p>
<p><code>ntpdc</code> <p><code>ntpdc</code>
is a utility program used to query is a utility program used to query
<code>ntpd(1ntpdmdoc)</code> <code>ntpd(1ntpdmdoc)</code>
about its about its
@ -107,52 +153,68 @@ through the
interface. interface.
In addition, nearly all the In addition, nearly all the
configuration options which can be specified at startup using configuration options which can be specified at startup using
ntpd's configuration file may also be specified at run time using ntpd&rsquo;s configuration file may also be specified at run time using
<code>ntpdc</code> <code>ntpdc</code>
</p>
<p>This section was generated by <strong>AutoGen</strong>, <p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program. using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program.
This software is released under the NTP license, &lt;http://ntp.org/license&gt;. This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-usage" accesskey="1">ntpdc usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpdc help/usage (<samp>--help</samp>)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv4" accesskey="2">ntpdc ipv4</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-ipv6" accesskey="3">ntpdc ipv6</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-command" accesskey="4">ntpdc command</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">command option (-c)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-interactive" accesskey="5">ntpdc interactive</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">interactive option (-i)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-listpeers" accesskey="6">ntpdc listpeers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">listpeers option (-l)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-numeric" accesskey="7">ntpdc numeric</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">numeric option (-n)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-peers" accesskey="8">ntpdc peers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">peers option (-p)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-showpeers" accesskey="9">ntpdc showpeers</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">showpeers option (-s)
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-config">ntpdc config</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring ntpdc
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-exit-status">ntpdc exit status</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Usage">ntpdc Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-See-Also">ntpdc See Also</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">See Also
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Authors">ntpdc Authors</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#ntpdc-Bugs">ntpdc Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Bugs
</td></tr>
</table>
<ul class="menu"> <hr>
<li><a accesskey="1" href="#ntpdc-usage">ntpdc usage</a>: ntpdc help/usage (<span class="option">--help</span>) <a name="ntpdc-usage"></a>
<li><a accesskey="2" href="#ntpdc-ipv4">ntpdc ipv4</a>: ipv4 option (-4) <div class="header">
<li><a accesskey="3" href="#ntpdc-ipv6">ntpdc ipv6</a>: ipv6 option (-6) <p>
<li><a accesskey="4" href="#ntpdc-command">ntpdc command</a>: command option (-c) Next: <a href="#ntpdc-ipv4" accesskey="n" rel="next">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<li><a accesskey="5" href="#ntpdc-interactive">ntpdc interactive</a>: interactive option (-i)
<li><a accesskey="6" href="#ntpdc-listpeers">ntpdc listpeers</a>: listpeers option (-l)
<li><a accesskey="7" href="#ntpdc-numeric">ntpdc numeric</a>: numeric option (-n)
<li><a accesskey="8" href="#ntpdc-peers">ntpdc peers</a>: peers option (-p)
<li><a accesskey="9" href="#ntpdc-showpeers">ntpdc showpeers</a>: showpeers option (-s)
<li><a href="#ntpdc-config">ntpdc config</a>: presetting/configuring ntpdc
<li><a href="#ntpdc-exit-status">ntpdc exit status</a>: exit status
<li><a href="#ntpdc-Usage">ntpdc Usage</a>: Usage
<li><a href="#ntpdc-See-Also">ntpdc See Also</a>: See Also
<li><a href="#ntpdc-Authors">ntpdc Authors</a>: Authors
<li><a href="#ntpdc-Bugs">ntpdc Bugs</a>: Bugs
</ul>
<div class="node">
<p><hr>
<a name="ntpdc-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv4">ntpdc ipv4</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
<br>
</div> </div>
<a name="ntpdc-help_002fusage-_0028_002d_002dhelp_0029"></a>
<h4 class="subsection">1.1.1 ntpdc help/usage (<samp>--help</samp>)</h4>
<a name="index-ntpdc-help"></a>
<h4 class="subsection">ntpdc help/usage (<span class="option">--help</span>)</h4> <p>This is the automatically generated usage text for ntpdc.
</p>
<p><a name="index-ntpdc-help-3"></a> <p>The text printed is the same whether selected with the <code>help</code> option
This is the automatically generated usage text for ntpdc. (<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>). <code>more-help</code> will print
<p>The text printed is the same whether selected with the <code>help</code> option
(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
the usage text by passing it through a pager program. the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working <code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function. The <code>PAGER</code> environment variable is <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
used to select the program, defaulting to <span class="file">more</span>. Both will exit used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0. with a status code of 0.
</p>
<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p12 <div class="example">
<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p13
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...] Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution -4 no ipv4 Force IPv4 DNS name resolution
@ -196,320 +258,333 @@ The following option preset mechanisms are supported:
- examining environment variables named NTPDC_* - examining environment variables named NTPDC_*
Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt; Please send bug reports to: &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
</pre> </pre></div>
<div class="node">
<p><hr> <hr>
<a name="ntpdc-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv6">ntpdc ipv6</a>, <a name="ntpdc-ipv4"></a>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-usage">ntpdc usage</a>, <div class="header">
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> <p>
<br> Next: <a href="#ntpdc-ipv6" accesskey="n" rel="next">ntpdc ipv6</a>, Previous: <a href="#ntpdc-usage" accesskey="p" rel="prev">ntpdc usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
</div> </div>
<a name="ipv4-option-_0028_002d4_0029"></a>
<h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
<a name="index-ntpdc_002dipv4"></a>
<h4 class="subsection">ipv4 option (-4)</h4> <p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
</p>
<p><a name="index-ntpdc_002dipv4-4"></a> <p>This option has some usage constraints. It:
This is the &ldquo;force ipv4 dns name resolution&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
ipv6. ipv6.
</ul> </li></ul>
<p>Force DNS resolution of following host names on the command line <p>Force DNS resolution of following host names on the command line
to the IPv4 namespace. to the IPv4 namespace.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-ipv6"></a>
<a name="ntpdc-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-command">ntpdc command</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv4">ntpdc ipv4</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-command" accesskey="n" rel="next">ntpdc command</a>, Previous: <a href="#ntpdc-ipv4" accesskey="p" rel="prev">ntpdc ipv4</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="ipv6-option-_0028_002d6_0029"></a>
<h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
<a name="index-ntpdc_002dipv6"></a>
<h4 class="subsection">ipv6 option (-6)</h4> <p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
</p>
<p><a name="index-ntpdc_002dipv6-5"></a> <p>This option has some usage constraints. It:
This is the &ldquo;force ipv6 dns name resolution&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
ipv4. ipv4.
</ul> </li></ul>
<p>Force DNS resolution of following host names on the command line <p>Force DNS resolution of following host names on the command line
to the IPv6 namespace. to the IPv6 namespace.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-command"></a>
<a name="ntpdc-command"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-interactive">ntpdc interactive</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv6">ntpdc ipv6</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-interactive" accesskey="n" rel="next">ntpdc interactive</a>, Previous: <a href="#ntpdc-ipv6" accesskey="p" rel="prev">ntpdc ipv6</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="command-option-_0028_002dc_0029"></a>
<h4 class="subsection">1.1.4 command option (-c)</h4>
<a name="index-ntpdc_002dcommand"></a>
<h4 class="subsection">command option (-c)</h4> <p>This is the &ldquo;run a command and exit&rdquo; option.
This option takes a string argument <samp>cmd</samp>.
</p>
<p>This option has some usage constraints. It:
</p><ul>
<li> may appear an unlimited number of times.
</li></ul>
<p><a name="index-ntpdc_002dcommand-6"></a> <p>The following argument is interpreted as an interactive format command
This is the &ldquo;run a command and exit&rdquo; option.
This option takes a string argument <span class="file">cmd</span>.
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>may appear an unlimited number of times.
</ul>
<p>The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified and is added to the list of commands to be executed on the specified
host(s). host(s).
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-interactive"></a>
<a name="ntpdc-interactive"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-listpeers">ntpdc listpeers</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-command">ntpdc command</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-listpeers" accesskey="n" rel="next">ntpdc listpeers</a>, Previous: <a href="#ntpdc-command" accesskey="p" rel="prev">ntpdc command</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="interactive-option-_0028_002di_0029"></a>
<h4 class="subsection">1.1.5 interactive option (-i)</h4>
<a name="index-ntpdc_002dinteractive"></a>
<h4 class="subsection">interactive option (-i)</h4> <p>This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
</p>
<p><a name="index-ntpdc_002dinteractive-7"></a> <p>This option has some usage constraints. It:
This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
command, listpeers, peers, showpeers. command, listpeers, peers, showpeers.
</ul> </li></ul>
<p>Force ntpq to operate in interactive mode. Prompts will be written <p>Force ntpq to operate in interactive mode. Prompts will be written
to the standard output and commands read from the standard input. to the standard output and commands read from the standard input.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-listpeers"></a>
<a name="ntpdc-listpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-numeric">ntpdc numeric</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-interactive">ntpdc interactive</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-numeric" accesskey="n" rel="next">ntpdc numeric</a>, Previous: <a href="#ntpdc-interactive" accesskey="p" rel="prev">ntpdc interactive</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="listpeers-option-_0028_002dl_0029"></a>
<h4 class="subsection">1.1.6 listpeers option (-l)</h4>
<a name="index-ntpdc_002dlistpeers"></a>
<h4 class="subsection">listpeers option (-l)</h4> <p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
<p><a name="index-ntpdc_002dlistpeers-8"></a> <p>This option has some usage constraints. It:
This is the &ldquo;print a list of the peers&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
command. command.
</ul> </li></ul>
<p>Print a list of the peers known to the server as well as a summary of <p>Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the 'listpeers' interactive command. their state. This is equivalent to the &rsquo;listpeers&rsquo; interactive command.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-numeric"></a>
<a name="ntpdc-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-peers">ntpdc peers</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-listpeers">ntpdc listpeers</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-peers" accesskey="n" rel="next">ntpdc peers</a>, Previous: <a href="#ntpdc-listpeers" accesskey="p" rel="prev">ntpdc listpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="numeric-option-_0028_002dn_0029"></a>
<h4 class="subsection">1.1.7 numeric option (-n)</h4>
<a name="index-ntpdc_002dnumeric"></a>
<h4 class="subsection">numeric option (-n)</h4> <p>This is the &ldquo;numeric host addresses&rdquo; option.
<p><a name="index-ntpdc_002dnumeric-9"></a>
This is the &ldquo;numeric host addresses&rdquo; option.
Output all host addresses in dotted-quad numeric format rather than Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names. converting to the canonical host names.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-peers"></a>
<a name="ntpdc-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-showpeers">ntpdc showpeers</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-numeric">ntpdc numeric</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-showpeers" accesskey="n" rel="next">ntpdc showpeers</a>, Previous: <a href="#ntpdc-numeric" accesskey="p" rel="prev">ntpdc numeric</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="peers-option-_0028_002dp_0029"></a>
<h4 class="subsection">1.1.8 peers option (-p)</h4>
<a name="index-ntpdc_002dpeers"></a>
<h4 class="subsection">peers option (-p)</h4> <p>This is the &ldquo;print a list of the peers&rdquo; option.
</p>
<p><a name="index-ntpdc_002dpeers-10"></a> <p>This option has some usage constraints. It:
This is the &ldquo;print a list of the peers&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
command. command.
</ul> </li></ul>
<p>Print a list of the peers known to the server as well as a summary <p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'peers' interactive command. of their state. This is equivalent to the &rsquo;peers&rsquo; interactive command.
<div class="node"> </p><hr>
<p><hr> <a name="ntpdc-showpeers"></a>
<a name="ntpdc-showpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-config">ntpdc config</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-peers">ntpdc peers</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-config" accesskey="n" rel="next">ntpdc config</a>, Previous: <a href="#ntpdc-peers" accesskey="p" rel="prev">ntpdc peers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="showpeers-option-_0028_002ds_0029"></a>
<h4 class="subsection">1.1.9 showpeers option (-s)</h4>
<a name="index-ntpdc_002dshowpeers"></a>
<h4 class="subsection">showpeers option (-s)</h4> <p>This is the &ldquo;show a list of the peers&rdquo; option.
</p>
<p><a name="index-ntpdc_002dshowpeers-11"></a> <p>This option has some usage constraints. It:
This is the &ldquo;show a list of the peers&rdquo; option. </p><ul>
<li> must not appear in combination with any of the following options:
<p class="noindent">This option has some usage constraints. It:
<ul>
<li>must not appear in combination with any of the following options:
command. command.
</ul> </li></ul>
<p>Print a list of the peers known to the server as well as a summary <p>Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command. of their state. This is equivalent to the &rsquo;dmpeers&rsquo; interactive command.
</p>
<div class="node"> <hr>
<p><hr> <a name="ntpdc-config"></a>
<a name="ntpdc-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-exit-status">ntpdc exit status</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-showpeers">ntpdc showpeers</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-exit-status" accesskey="n" rel="next">ntpdc exit status</a>, Previous: <a href="#ntpdc-showpeers" accesskey="p" rel="prev">ntpdc showpeers</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="presetting_002fconfiguring-ntpdc"></a>
<h4 class="subsection">presetting/configuring ntpdc</h4> <h4 class="subsection">1.1.10 presetting/configuring ntpdc</h4>
<p>Any option that is not marked as <i>not presettable</i> may be preset by <p>Any option that is not marked as <i>not presettable</i> may be preset by
loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of loading values from configuration (&quot;rc&quot; or &quot;ini&quot;) files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_&lt;OPTION_NAME&gt;</code>. <code>&lt;OPTION_NAME&gt;</code> must be one of
the options listed above in upper case and segmented with underscores. the options listed above in upper case and segmented with underscores.
The <code>NTPDC</code> variable will be tokenized and parsed like The <code>NTPDC</code> variable will be tokenized and parsed like
the command line. The remaining variables are tested for existence and their the command line. The remaining variables are tested for existence and their
values are treated like option arguments. values are treated like option arguments.
</p>
<p class="noindent"><code>libopts</code> will search in 2 places for configuration files: <p><code>libopts</code> will search in 2 places for configuration files:
<ul> </p><ul>
<li>$HOME <li> $HOME
<li>$PWD </li><li> $PWD
</ul> </li></ul>
The environment variables <code>HOME</code>, and <code>PWD</code> <p>The environment variables <code>HOME</code>, and <code>PWD</code>
are expanded and replaced when <span class="file">ntpdc</span> runs. are expanded and replaced when <samp>ntpdc</samp> runs.
For any of these that are plain files, they are simply processed. For any of these that are plain files, they are simply processed.
For any that are directories, then a file named <span class="file">.ntprc</span> is searched for For any that are directories, then a file named <samp>.ntprc</samp> is searched for
within that directory and processed. within that directory and processed.
</p>
<p>Configuration files may be in a wide variety of formats. <p>Configuration files may be in a wide variety of formats.
The basic format is an option name followed by a value (argument) on the The basic format is an option name followed by a value (argument) on the
same line. Values may be separated from the option name with a colon, same line. Values may be separated from the option name with a colon,
equal sign or simply white space. Values may be continued across multiple equal sign or simply white space. Values may be continued across multiple
lines by escaping the newline with a backslash. lines by escaping the newline with a backslash.
</p>
<p>Multiple programs may also share the same initialization file. <p>Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific Common options are collected at the top, followed by program specific
segments. The segments are separated by lines like: segments. The segments are separated by lines like:
<pre class="example"> [NTPDC] </p><div class="example">
</pre> <pre class="example">[NTPDC]
<p class="noindent">or by </pre></div>
<pre class="example"> &lt;?program ntpdc&gt; <p>or by
</pre> </p><div class="example">
<p class="noindent">Do not mix these styles within one configuration file. <pre class="example">&lt;?program ntpdc&gt;
</pre></div>
<p>Compound values and carefully constructed string values may also be <p>Do not mix these styles within one configuration file.
</p>
<p>Compound values and carefully constructed string values may also be
specified using XML syntax: specified using XML syntax:
<pre class="example"> &lt;option-name&gt; </p><div class="example">
<pre class="example">&lt;option-name&gt;
&lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt; &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
&lt;/option-name&gt; &lt;/option-name&gt;
</pre> </pre></div>
<p class="noindent">yielding an <code>option-name.sub-opt</code> string value of <p>yielding an <code>option-name.sub-opt</code> string value of
<pre class="example"> "...&lt;...&gt;..." </p><div class="example">
</pre> <pre class="example">&quot;...&lt;...&gt;...&quot;
<p><code>AutoOpts</code> does not track suboptions. You simply note that it is a </pre></div>
<p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
the associated name/value pair list (see: optionFindValue). the associated name/value pair list (see: optionFindValue).
</p>
<p>The command line options relating to configuration and/or usage help are: <p>The command line options relating to configuration and/or usage help are:
</p>
<h5 class="subsubheading">version (-)</h5> <a name="version-_0028_002d_0029"></a>
<h4 class="subsubheading">version (-)</h4>
<p>Print the program version to standard out, optionally with licensing <p>Print the program version to standard out, optionally with licensing
information, then exit 0. The optional argument specifies how much licensing information, then exit 0. The optional argument specifies how much licensing
detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
Only the first letter of the argument is examined: Only the first letter of the argument is examined:
</p>
<dl> <dl compact="compact">
<dt><span class="samp">version</span><dd>Only print the version. This is the default. <dt>&lsquo;<samp>version</samp>&rsquo;</dt>
<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. <dd><p>Only print the version. This is the default.
<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. </p></dd>
<dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
<dd><p>Name the copyright usage licensing terms.
</p></dd>
<dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
<dd><p>Print the full copyright usage licensing terms.
</p></dd>
</dl> </dl>
<div class="node"> <hr>
<p><hr> <a name="ntpdc-exit-status"></a>
<a name="ntpdc-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Usage">ntpdc Usage</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-config">ntpdc config</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-Usage" accesskey="n" rel="next">ntpdc Usage</a>, Previous: <a href="#ntpdc-config" accesskey="p" rel="prev">ntpdc config</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="ntpdc-exit-status-1"></a>
<h4 class="subsection">ntpdc exit status</h4> <h4 class="subsection">1.1.11 ntpdc exit status</h4>
<p>One of the following exit values will be returned: <p>One of the following exit values will be returned:
<dl> </p><dl compact="compact">
<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. <dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. <dd><p>Successful program execution.
<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. </p></dd>
<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report <dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
<dd><p>The operation failed or the command syntax was not valid.
</p></dd>
<dt>&lsquo;<samp>66 (EX_NOINPUT)</samp>&rsquo;</dt>
<dd><p>A specified configuration file could not be loaded.
</p></dd>
<dt>&lsquo;<samp>70 (EX_SOFTWARE)</samp>&rsquo;</dt>
<dd><p>libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you. it to autogen-users@lists.sourceforge.net. Thank you.
</p></dd>
</dl> </dl>
<div class="node"> <hr>
<p><hr> <a name="ntpdc-Usage"></a>
<a name="ntpdc-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-See-Also">ntpdc See Also</a>, <div class="header">
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-exit-status">ntpdc exit status</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Next: <a href="#ntpdc-See-Also" accesskey="n" rel="next">ntpdc See Also</a>, Previous: <a href="#ntpdc-exit-status" accesskey="p" rel="prev">ntpdc exit status</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="ntpdc-Usage-1"></a>
<h4 class="subsection">ntpdc Usage</h4> <h4 class="subsection">1.1.12 ntpdc Usage</h4>
<hr>
<div class="node"> <a name="ntpdc-See-Also"></a>
<p><hr> <div class="header">
<a name="ntpdc-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Authors">ntpdc Authors</a>, <p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Usage">ntpdc Usage</a>, Next: <a href="#ntpdc-Authors" accesskey="n" rel="next">ntpdc Authors</a>, Previous: <a href="#ntpdc-Usage" accesskey="p" rel="prev">ntpdc Usage</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
<br>
</div> </div>
<a name="ntpdc-See-Also-1"></a>
<h4 class="subsection">ntpdc See Also</h4> <h4 class="subsection">1.1.13 ntpdc See Also</h4>
<hr>
<div class="node"> <a name="ntpdc-Authors"></a>
<p><hr> <div class="header">
<a name="ntpdc-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Bugs">ntpdc Bugs</a>, <p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-See-Also">ntpdc See Also</a>, Next: <a href="#ntpdc-Bugs" accesskey="n" rel="next">ntpdc Bugs</a>, Previous: <a href="#ntpdc-See-Also" accesskey="p" rel="prev">ntpdc See Also</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
<br>
</div> </div>
<a name="ntpdc-Authors-1"></a>
<h4 class="subsection">ntpdc Authors</h4> <h4 class="subsection">1.1.14 ntpdc Authors</h4>
<hr>
<div class="node"> <a name="ntpdc-Bugs"></a>
<p><hr> <div class="header">
<a name="ntpdc-Bugs"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Authors">ntpdc Authors</a>, <p>
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> Previous: <a href="#ntpdc-Authors" accesskey="p" rel="prev">ntpdc Authors</a>, Up: <a href="#ntpdc-Invocation" accesskey="u" rel="up">ntpdc Invocation</a> &nbsp; </p>
<br>
</div> </div>
<a name="ntpdc-Bugs-1"></a>
<h4 class="subsection">1.1.15 ntpdc Bugs</h4>
<h4 class="subsection">ntpdc Bugs</h4> <hr>
<div class="node">
<p><hr>
<a name="Usage"></a> <a name="Usage"></a>
<br> <div class="header">
<p>
Previous: <a href="#ntpdc-Invocation" accesskey="p" rel="prev">ntpdc Invocation</a>, Up: <a href="#ntpdc-Description" accesskey="u" rel="up">ntpdc Description</a> &nbsp; </p>
</div> </div>
<a name="Usage-1"></a>
<!-- node-name, next, previous, up --> <h3 class="section">1.2 Usage</h3>
<h3 class="section">Usage</h3>
<p>The simplest use of this program is as an unprivileged command to <p>The simplest use of this program is as an unprivileged command to
check the current time, offset, and error in the local clock. check the current time, offset, and error in the local clock.
For example: For example:
</p>
<div class="example">
<pre class="example">ntpdc ntpserver.somewhere
</pre></div>
<pre class="example"> ntpdc ntpserver.somewhere <p>With suitable privilege, it can be run as a command or in a
</pre>
<p>With suitable privilege, it can be run as a command or in a
<code>cron</code> job to reset the local clock from a reliable server, like <code>cron</code> job to reset the local clock from a reliable server, like
the <code>ntpdate</code> and <code>rdate</code> commands. the <code>ntpdate</code> and <code>rdate</code> commands.
For example: For example:
</p>
<div class="example">
<pre class="example">ntpdc -a ntpserver.somewhere
</pre></div>
<hr>
<pre class="example"> ntpdc -a ntpserver.somewhere
</pre>
</body></html>
</body>
</html>

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpdc @NTPDC_MS@ "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpdc @NTPDC_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-uwaqJD/ag-GwaiID) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:36 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:53 AM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def .\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPDC @NTPDC_MS@ User Commands .Dt NTPDC @NTPDC_MS@ User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:43 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:50 AM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def .\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -2713,8 +2713,17 @@ clockstat(
lfptoa(&ts, 6)); lfptoa(&ts, 6));
(void) fprintf(fp, "stratum: %ld\n", (void) fprintf(fp, "stratum: %ld\n",
(u_long)ntohl(cl->fudgeval1)); (u_long)ntohl(cl->fudgeval1));
/* [Bug3527] Backward Incompatible: cl->fudgeval2 is
* a string, instantiated via memcpy() so there is no
* endian issue to correct.
*/
#ifdef DISABLE_BUG3527_FIX
(void) fprintf(fp, "reference ID: %s\n", (void) fprintf(fp, "reference ID: %s\n",
refid_string(ntohl(cl->fudgeval2), 0)); refid_string(ntohl(cl->fudgeval2), 0));
#else
(void) fprintf(fp, "reference ID: %s\n",
refid_string(cl->fudgeval2, 0));
#endif
(void) fprintf(fp, "fudge flags: 0x%x\n", (void) fprintf(fp, "fudge flags: 0x%x\n",
cl->flags); cl->flags);
@ -2920,7 +2929,7 @@ kerninfo(
size_t itemsize; size_t itemsize;
int res; int res;
unsigned status; unsigned status;
double tscale = 1e-6; double tscale_usec = 1e-6, tscale_unano = 1e-6;
again: again:
res = doquery(impl_ver, REQ_GET_KERNEL, 0, 0, 0, (char *)NULL, res = doquery(impl_ver, REQ_GET_KERNEL, 0, 0, 0, (char *)NULL,
@ -2945,16 +2954,16 @@ kerninfo(
*/ */
#ifdef STA_NANO #ifdef STA_NANO
if (status & STA_NANO) if (status & STA_NANO)
tscale = 1e-9; tscale_unano = 1e-9;
#endif #endif
(void)fprintf(fp, "pll offset: %g s\n", (void)fprintf(fp, "pll offset: %g s\n",
(int32)ntohl(ik->offset) * tscale); (int32)ntohl(ik->offset) * tscale_unano);
(void)fprintf(fp, "pll frequency: %s ppm\n", (void)fprintf(fp, "pll frequency: %s ppm\n",
fptoa((s_fp)ntohl(ik->freq), 3)); fptoa((s_fp)ntohl(ik->freq), 3));
(void)fprintf(fp, "maximum error: %g s\n", (void)fprintf(fp, "maximum error: %g s\n",
(u_long)ntohl(ik->maxerror) * tscale); (u_long)ntohl(ik->maxerror) * tscale_usec);
(void)fprintf(fp, "estimated error: %g s\n", (void)fprintf(fp, "estimated error: %g s\n",
(u_long)ntohl(ik->esterror) * tscale); (u_long)ntohl(ik->esterror) * tscale_usec);
(void)fprintf(fp, "status: %04x ", status); (void)fprintf(fp, "status: %04x ", status);
#ifdef STA_PLL #ifdef STA_PLL
if (status & STA_PLL) (void)fprintf(fp, " pll"); if (status & STA_PLL) (void)fprintf(fp, " pll");
@ -3008,7 +3017,7 @@ kerninfo(
(void)fprintf(fp, "pll time constant: %ld\n", (void)fprintf(fp, "pll time constant: %ld\n",
(u_long)ntohl(ik->constant)); (u_long)ntohl(ik->constant));
(void)fprintf(fp, "precision: %g s\n", (void)fprintf(fp, "precision: %g s\n",
(u_long)ntohl(ik->precision) * tscale); (u_long)ntohl(ik->precision) * tscale_usec);
(void)fprintf(fp, "frequency tolerance: %s ppm\n", (void)fprintf(fp, "frequency tolerance: %s ppm\n",
fptoa((s_fp)ntohl(ik->tolerance), 0)); fptoa((s_fp)ntohl(ik->tolerance), 0));
@ -3027,7 +3036,7 @@ kerninfo(
(void)fprintf(fp, "pps stability: %s ppm\n", (void)fprintf(fp, "pps stability: %s ppm\n",
fptoa((s_fp)ntohl(ik->stabil), 3)); fptoa((s_fp)ntohl(ik->stabil), 3));
(void)fprintf(fp, "pps jitter: %g s\n", (void)fprintf(fp, "pps jitter: %g s\n",
(u_long)ntohl(ik->jitter) * tscale); (u_long)ntohl(ik->jitter) * tscale_unano);
(void)fprintf(fp, "calibration interval: %d s\n", (void)fprintf(fp, "calibration interval: %d s\n",
1 << ntohs(ik->shift)); 1 << ntohs(ik->shift));
(void)fprintf(fp, "calibration cycles: %ld\n", (void)fprintf(fp, "calibration cycles: %ld\n",

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:30:02 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:57:01 AM by AutoGen 5.18.5
# From the definitions ntpq-opts.def # From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl # and the template file agtexi-cmd.tpl
@end ignore @end ignore
@ -944,7 +944,7 @@ with a status code of 0.
@exampleindent 0 @exampleindent 0
@example @example
ntpq - standard NTP query program - Ver. 4.2.8p12 ntpq - standard NTP query program - Ver. 4.2.8p13
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...] Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution -4 no ipv4 Force IPv4 name resolution

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c) * EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
* *
* It has been AutoGen-ed August 14, 2018 at 08:29:47 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:54 AM by AutoGen 5.18.5
* From the definitions ntpq-opts.def * From the definitions ntpq-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This source file is not encumbered * AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -69,7 +69,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpq options * static const strings for ntpq options
*/ */
static char const ntpq_opt_strs[1977] = static char const ntpq_opt_strs[1977] =
/* 0 */ "ntpq 4.2.8p12\n" /* 0 */ "ntpq 4.2.8p13\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n" "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n" "This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n" "redistribution under the terms of the NTP License, copies of which\n"
@ -132,13 +132,13 @@ static char const ntpq_opt_strs[1977] =
/* 1768 */ "no-load-opts\0" /* 1768 */ "no-load-opts\0"
/* 1781 */ "no\0" /* 1781 */ "no\0"
/* 1784 */ "NTPQ\0" /* 1784 */ "NTPQ\0"
/* 1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p12\n" /* 1789 */ "ntpq - standard NTP query program - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1909 */ "$HOME\0" /* 1909 */ "$HOME\0"
/* 1915 */ ".\0" /* 1915 */ ".\0"
/* 1917 */ ".ntprc\0" /* 1917 */ ".ntprc\0"
/* 1924 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 1924 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1958 */ "ntpq 4.2.8p12\0" /* 1958 */ "ntpq 4.2.8p13\0"
/* 1972 */ "hash"; /* 1972 */ "hash";
/** /**
@ -841,7 +841,7 @@ static void bogus_function(void) {
translate option names. translate option names.
*/ */
/* referenced via ntpqOptions.pzCopyright */ /* referenced via ntpqOptions.pzCopyright */
puts(_("ntpq 4.2.8p12\n\ puts(_("ntpq 4.2.8p13\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\ Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\ This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\ redistribution under the terms of the NTP License, copies of which\n\
@ -910,11 +910,11 @@ implied warranty.\n"));
puts(_("load options from a config file")); puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */ /* referenced via ntpqOptions.pzUsageTitle */
puts(_("ntpq - standard NTP query program - Ver. 4.2.8p12\n\ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p13\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n")); Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */ /* referenced via ntpqOptions.pzFullVersion */
puts(_("ntpq 4.2.8p12")); puts(_("ntpq 4.2.8p13"));
/* referenced via ntpqOptions.pzFullUsage */ /* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>")); puts(_("<<<NOT-FOUND>>>"));

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h) * EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
* *
* It has been AutoGen-ed August 14, 2018 at 08:29:47 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:56:54 AM by AutoGen 5.18.5
* From the definitions ntpq-opts.def * From the definitions ntpq-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This header file is not encumbered * AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -53,7 +53,7 @@
* tolerable version is at least as old as what was current when the header * tolerable version is at least as old as what was current when the header
* template was released. * template was released.
*/ */
#define AO_TEMPLATE_VERSION 167936 #define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header # error option template version mismatches autoopts/options.h header
@ -84,9 +84,9 @@ typedef enum {
/** count of all options for ntpq */ /** count of all options for ntpq */
#define OPTION_CT 16 #define OPTION_CT 16
/** ntpq version */ /** ntpq version */
#define NTPQ_VERSION "4.2.8p12" #define NTPQ_VERSION "4.2.8p13"
/** Full ntpq version text */ /** Full ntpq version text */
#define NTPQ_FULL_VERSION "ntpq 4.2.8p12" #define NTPQ_FULL_VERSION "ntpq 4.2.8p13"
/** /**
* Interface defines for all options. Replace "n" with the UPPER_CASED * Interface defines for all options. Replace "n" with the UPPER_CASED

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpq 1ntpqman "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpq 1ntpqman "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_XaWRE/ag-lYaOQE) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:58 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:02 AM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def .\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPQ 1ntpqmdoc User Commands .Dt NTPQ 1ntpqmdoc User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:05 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:59 AM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def .\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

File diff suppressed because it is too large Load Diff

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpq @NTPQ_MS@ "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpq @NTPQ_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-_XaWRE/ag-lYaOQE) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:29:58 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:02 AM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def .\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPQ @NTPQ_MS@ User Commands .Dt NTPQ @NTPQ_MS@ User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:05 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:56:59 AM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def .\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -6,7 +6,7 @@
# #
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi) # EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
# #
# It has been AutoGen-ed August 14, 2018 at 08:30:14 AM by AutoGen 5.18.5 # It has been AutoGen-ed February 20, 2019 at 09:57:07 AM by AutoGen 5.18.5
# From the definitions ntpsnmpd-opts.def # From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl # and the template file agtexi-cmd.tpl
@end ignore @end ignore
@ -47,31 +47,30 @@ with a status code of 0.
@exampleindent 0 @exampleindent 0
@example @example
ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.7p245 ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13
USAGE: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... Usage: ntpsnmpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description Flg Arg Option-Name Description
-n no nofork Do not fork -n no nofork Do not fork
-p no syslog Log to syslog() -p no syslog Log to syslog()
Str agentxsocket The socket address ntpsnmpd uses to connect to net-snmpd Str agentxsocket The socket address ntpsnmpd uses to connect to net-snmpd
opt version Output version information and exit opt version output version information and exit
-? no help Display extended usage information and exit -? no help display extended usage information and exit
-! no more-help Extended usage information passed thru pager -! no more-help extended usage information passed thru pager
-> opt save-opts Save the option state to a config file -> opt save-opts save the option state to a config file
-< Str load-opts Load options from a config file -< Str load-opts load options from a config file
- disabled as --no-load-opts - disabled as '--no-load-opts'
- may appear multiple times - may appear multiple times
Options are specified by doubled hyphens and their name or by a single Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character. hyphen and the flag character.
The following option preset mechanisms are supported: The following option preset mechanisms are supported:
- reading file $HOME/.ntprc - reading file $HOME/.ntprc
- reading file ./.ntprc - reading file ./.ntprc
- examining environment variables named NTPSNMPD_* - examining environment variables named NTPSNMPD_*
please send bug reports to: http://bugs.ntp.org, bugs@@ntp.org Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
@end example @end example
@exampleindent 4 @exampleindent 4

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c) * EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
* *
* It has been AutoGen-ed August 14, 2018 at 08:30:08 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:57:03 AM by AutoGen 5.18.5
* From the definitions ntpsnmpd-opts.def * From the definitions ntpsnmpd-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This source file is not encumbered * AutoOpts is a copyrighted work. This source file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -61,7 +61,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpsnmpd options * static const strings for ntpsnmpd options
*/ */
static char const ntpsnmpd_opt_strs[1613] = static char const ntpsnmpd_opt_strs[1613] =
/* 0 */ "ntpsnmpd 4.2.8p12\n" /* 0 */ "ntpsnmpd 4.2.8p13\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n" "Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n" "This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n" "redistribution under the terms of the NTP License, copies of which\n"
@ -101,14 +101,14 @@ static char const ntpsnmpd_opt_strs[1613] =
/* 1415 */ "no-load-opts\0" /* 1415 */ "no-load-opts\0"
/* 1428 */ "no\0" /* 1428 */ "no\0"
/* 1431 */ "NTPSNMPD\0" /* 1431 */ "NTPSNMPD\0"
/* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p12\n" /* 1440 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0" "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 1544 */ "$HOME\0" /* 1544 */ "$HOME\0"
/* 1550 */ ".\0" /* 1550 */ ".\0"
/* 1552 */ ".ntprc\0" /* 1552 */ ".ntprc\0"
/* 1559 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 1559 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1593 */ "\n\0" /* 1593 */ "\n\0"
/* 1595 */ "ntpsnmpd 4.2.8p12"; /* 1595 */ "ntpsnmpd 4.2.8p13";
/** /**
* nofork option description: * nofork option description:
@ -554,7 +554,7 @@ static void bogus_function(void) {
translate option names. translate option names.
*/ */
/* referenced via ntpsnmpdOptions.pzCopyright */ /* referenced via ntpsnmpdOptions.pzCopyright */
puts(_("ntpsnmpd 4.2.8p12\n\ puts(_("ntpsnmpd 4.2.8p13\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\ Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\ This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\ redistribution under the terms of the NTP License, copies of which\n\
@ -599,14 +599,14 @@ implied warranty.\n"));
puts(_("load options from a config file")); puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */ /* referenced via ntpsnmpdOptions.pzUsageTitle */
puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p12\n\ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.2.8p13\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n")); Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */ /* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n")); puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */ /* referenced via ntpsnmpdOptions.pzFullVersion */
puts(_("ntpsnmpd 4.2.8p12")); puts(_("ntpsnmpd 4.2.8p13"));
/* referenced via ntpsnmpdOptions.pzFullUsage */ /* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>")); puts(_("<<<NOT-FOUND>>>"));

View File

@ -1,11 +1,11 @@
/* /*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h) * EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
* *
* It has been AutoGen-ed August 14, 2018 at 08:30:08 AM by AutoGen 5.18.5 * It has been AutoGen-ed February 20, 2019 at 09:57:03 AM by AutoGen 5.18.5
* From the definitions ntpsnmpd-opts.def * From the definitions ntpsnmpd-opts.def
* and the template file options * and the template file options
* *
* Generated from AutoOpts 41:0:16 templates. * Generated from AutoOpts 41:1:16 templates.
* *
* AutoOpts is a copyrighted work. This header file is not encumbered * AutoOpts is a copyrighted work. This header file is not encumbered
* by AutoOpts licensing, but is provided under the licensing terms chosen * by AutoOpts licensing, but is provided under the licensing terms chosen
@ -53,7 +53,7 @@
* tolerable version is at least as old as what was current when the header * tolerable version is at least as old as what was current when the header
* template was released. * template was released.
*/ */
#define AO_TEMPLATE_VERSION 167936 #define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \ #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION) || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header # error option template version mismatches autoopts/options.h header
@ -76,9 +76,9 @@ typedef enum {
/** count of all options for ntpsnmpd */ /** count of all options for ntpsnmpd */
#define OPTION_CT 8 #define OPTION_CT 8
/** ntpsnmpd version */ /** ntpsnmpd version */
#define NTPSNMPD_VERSION "4.2.8p12" #define NTPSNMPD_VERSION "4.2.8p13"
/** Full ntpsnmpd version text */ /** Full ntpsnmpd version text */
#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p12" #define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.2.8p13"
/** /**
* Interface defines for all options. Replace "n" with the UPPER_CASED * Interface defines for all options. Replace "n" with the UPPER_CASED

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpsnmpd 1ntpsnmpdman "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpsnmpd 1ntpsnmpdman "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-vVaOGF/ag-HVaGFF) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:10 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:08 AM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def .\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPSNMPD 1ntpsnmpdmdoc User Commands .Dt NTPSNMPD 1ntpsnmpdmdoc User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:16 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:05 AM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def .\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -1,79 +1,116 @@
<html lang="en"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head> <head>
<title>ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html"> <title>ntpsnmpd: Network Time Protocol SNMP Daemon User&rsquo;s Manual</title>
<meta name="description" content="ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual">
<meta name="generator" content="makeinfo 4.7"> <meta name="description" content="ntpsnmpd: Network Time Protocol SNMP Daemon User&rsquo;s Manual">
<link title="Top" rel="top" href="#Top"> <meta name="keywords" content="ntpsnmpd: Network Time Protocol SNMP Daemon User&rsquo;s Manual">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta name="resource-type" content="document">
<meta http-equiv="Content-Style-Type" content="text/css"> <meta name="distribution" content="global">
<style type="text/css"><!-- <meta name="Generator" content="makeinfo">
pre.display { font-family:inherit } <link href="#Top" rel="start" title="Top">
pre.format { font-family:inherit } <link href="dir.html#Top" rel="up" title="(dir)">
pre.smalldisplay { font-family:inherit; font-size:smaller } <style type="text/css">
pre.smallformat { font-family:inherit; font-size:smaller } <!--
pre.smallexample { font-size:smaller } a.summary-letter {text-decoration: none}
pre.smalllisp { font-size:smaller } blockquote.indentedblock {margin-right: 0em}
span.sc { font-variant:small-caps } blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
span.roman { font-family: serif; font-weight: normal; } blockquote.smallquotation {font-size: smaller}
--></style> div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head> </head>
<body>
<h1 class="settitle">ntpsnmpd: Network Time Protocol SNMP Daemon User's Manual</h1> <body lang="en">
<div class="shortcontents"> <h1 class="settitle" align="center">ntpsnmpd: Network Time Protocol SNMP Daemon User&rsquo;s Manual</h1>
<h2>Short Contents</h2>
<ul>
<a href="#Top">ntpsnmpd: Network Time Protocol Query User Manual</a>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
<ul class="no-bullet">
<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul> </ul>
</div> </div>
<a name="Top"></a>
<div class="node"> <div class="header">
<p><hr> <p>
<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpsnmpd-Description">ntpsnmpd Description</a>, Next: <a href="#ntpsnmpd-Description" accesskey="n" rel="next">ntpsnmpd Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<br>
</div> </div>
<a name="ntpsnmpd_003a-Network-Time-Protocol-Query-User-Manual"></a>
<h2 class="unnumbered">ntpsnmpd: Network Time Protocol Query User Manual</h2> <h1 class="top">ntpsnmpd: Network Time Protocol Query User Manual</h1>
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code> <p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control operations and determine performance. It uses the standard NTP mode 6 control
</p>
<p>This document applies to version 4.2.8p13 of <code>ntpsnmpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
</td></tr>
<tr><td align="left" valign="top">&bull; ntpsnmpd Invocation:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking ntpsnmpd
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
</td></tr>
</table>
<p>This document applies to version 4.2.8p12 of <code>ntpsnmpd</code>. <hr>
<a name="ntpsnmpd-Description"></a>
<ul class="menu"> <div class="header">
<li><a accesskey="1" href="#ntpsnmpd-Description">ntpsnmpd Description</a>: Description <p>
<li><a accesskey="2" href="#ntpsnmpd-Invocation">ntpsnmpd Invocation</a>: Invoking ntpsnmpd Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
<li><a accesskey="3" href="#Usage">Usage</a>: Usage
</ul>
<div class="node">
<p><hr>
<a name="ntpsnmpd-Description"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#Usage">Usage</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
</div> </div>
<a name="Description"></a>
<!-- node-name, next, previous, up --> <h2 class="chapter">1 Description</h2>
<h3 class="section">Description</h3>
<p>The <code>ntpsnmpd</code> utility program provides an SNMP MIB agent for <code>ntpd</code>. <p>The <code>ntpsnmpd</code> utility program provides an SNMP MIB agent for <code>ntpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="1">Usage</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>
<div class="node"> <hr>
<p><hr> <a name="Usage"></a>
<a name="Usage"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpsnmpd-Description">ntpsnmpd Description</a>, <div class="header">
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a> <p>
<br> Previous: <a href="#ntpsnmpd-Description" accesskey="p" rel="prev">ntpsnmpd Description</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
</div> </div>
<a name="Usage-1"></a>
<!-- node-name, next, previous, up --> <h3 class="section">1.1 Usage</h3>
<h3 class="section">Usage</h3>
<p>(what should we say here?) <p>(what should we say here?)
</p><hr>
</body></html>
</body>
</html>

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH ntpsnmpd @NTPSNMPD_MS@ "14 Aug 2018" "4.2.8p12" "User Commands" .TH ntpsnmpd @NTPSNMPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-vVaOGF/ag-HVaGFF) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:10 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:08 AM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def .\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

View File

@ -1,9 +1,9 @@
.Dd August 14 2018 .Dd February 20 2019
.Dt NTPSNMPD @NTPSNMPD_MS@ User Commands .Dt NTPSNMPD @NTPSNMPD_MS@ User Commands
.Os .Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc) .\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:30:16 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:05 AM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def .\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl .\" and the template file agmdoc-cmd.tpl
.Sh NAME .Sh NAME

View File

@ -83,7 +83,7 @@ CLTAG=NTP_4_2_0
# - Numeric values increment # - Numeric values increment
# - empty 'increments' to 1 # - empty 'increments' to 1
# - NEW 'increments' to empty # - NEW 'increments' to empty
point=12 point=13
### betapoint is normally modified by script. ### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint) # ntp-stable Beta number (betapoint)

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -10,13 +10,13 @@
if test ! -f $1 if test ! -f $1
then then
echo "$0: $1 is not a regular file!" 2>&3 echo "$0: $1 is not a regular file!" 1>&2
exit 1 exit 1
fi fi
if grep -q 'no --help' $1 if grep -q 'no --help' $1
then then
echo "$0: $1 contains 'no --help'!" 2>&3 echo "$0: $1 contains 'no --help'!" 1>&2
mv ${1} ${1}- mv ${1} ${1}-
exit 1 exit 1
fi fi

View File

@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15 from Makefile.am. # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc. # Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,

View File

@ -10,11 +10,11 @@
.ds B-Font B .ds B-Font B
.ds I-Font I .ds I-Font I
.ds R-Font R .ds R-Font R
.TH calc_tickadj 1calc_tickadjman "14 Aug 2018" "ntp (4.2.8p12)" "User Commands" .TH calc_tickadj 1calc_tickadjman "20 Feb 2019" "ntp (4.2.8p13)" "User Commands"
.\" .\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-98aG9a/ag-j9aG8a) .\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\" .\"
.\" It has been AutoGen-ed August 14, 2018 at 08:08:53 AM by AutoGen 5.18.5 .\" It has been AutoGen-ed February 20, 2019 at 09:57:23 AM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def .\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl .\" and the template file agman-cmd.tpl
.SH NAME .SH NAME

Some files were not shown because too many files have changed in this diff Show More