Compare commits

...
113 Commits
Author SHA1 Message Date
Gordon Tetlow c0d2bc3b03 Import tzdata 2019c.
Approved by:	so
Security:	FreeBSD-EN-19:18.tzdata
2019-10-23 03:25:32 +00:00
Gordon Tetlow 27a7c12018 Bump version information and add UPDATING entries.
Approved by:	so
2019-08-20 17:52:28 +00:00
Gordon Tetlow feddf2c665 Fix reference count overflow in mqueuefs.
Approved by:	so
Security:	FreeBSD-SA-19:24.mqueuefs
Security:	CVE-2019-5603
2019-08-20 17:51:32 +00:00
Gordon Tetlow 7aaf53efdb Fix kernel memory disclosure from /dev/midistat.
Approved by:	so
Security:	FreeBSD-SA-19:23.midi
Security:	CVE-2019-5612
2019-08-20 17:50:33 +00:00
Gordon Tetlow 27340c9963 Fix IPv6 remote denial of service.
Approved by:	so
Security:	FreeBSD-SA-19:22.mbuf
Security:	CVE-2019-5611
2019-08-20 17:49:33 +00:00
Gordon Tetlow c96f623f62 Bump version information and add UPDATING entries.
Approved by:	so
2019-08-06 17:14:09 +00:00
Gordon Tetlow e478aa88c4 Fix insufficient validation of guest-supplied data (e1000 device).
Approved by:	so
Security:	FreeBSD-SA-19:21.bhyve
Security:	CVE-2019-5609
2019-08-06 17:13:17 +00:00
Gordon Tetlow 83bd9ac1a9 Fix insufficient message length validation in bsnmp library.
Approved by:	so
Security:	FreeBSD-SA-19:20.bsnmp
Security:	CVE-2019-5610
2019-08-06 17:12:17 +00:00
Gordon Tetlow 559bc7e1f9 Fix ICMPv6 / MLDv2 out-of-bounds memory access.
Approved by:	so
Security:	FreeBSD-SA-19:19.mldv2
Security:	CVE-2019-5608
2019-08-06 17:11:17 +00:00
Gordon Tetlow a870b2fd16 Fix multiple vulnerabilities in bzip2.
Approved by:	so
Security:	FreeBSD-SA-19:18.bzip2
Security:	CVE-2016-3189
Security:	CVE-2019-12900
2019-08-06 17:09:47 +00:00
Gordon Tetlow bac88a5f0d Fix incorrect exception handling.
Approved by:	so
Security:	FreeBSD-EN-19:15.libunwind
2019-08-06 17:08:30 +00:00
Gordon Tetlow c8125a8718 Bump version information and update UPDATING.
Approved by:	so
2019-07-24 12:58:21 +00:00
Gordon Tetlow 0447f3e0c4 Fix file descriptor reference count leak.
Approved by:	so
Security:	FreeBSD-SA-19:17.fd
Security:	CVE-2019-5607
2019-07-24 12:57:49 +00:00
Gordon Tetlow 7a0d6713f6 Fix byhve out-of-bounds read in XHCI device.
Approved by:	so
Security:	FreeBSD-SA-19:16.bhyve
Security:	CVE-2019-5604
2019-07-24 12:56:06 +00:00
Gordon Tetlow a666704387 Fix reference count overflow in mqueuefs.
Approved by:	so
Security:	FreeBSD-SA-19:15.mqueuefs
Security:	CVE-2019-5603
2019-07-24 12:55:16 +00:00
Gordon Tetlow adbd570877 Fix kernel memory disclosure in freebsd32_ioctl.
Approved by:	so
Security:	FreeBSD-SA-19:14.freebsd32
Security:	CVE-2019-5605
2019-07-24 12:54:10 +00:00
Gordon Tetlow 782845e111 Fix pts write-after-free.
Approved by:	so
Security:	FreeBSD-SA-19:13.pts
Security:	CVE-2019-5606
2019-07-24 12:53:06 +00:00
Gordon Tetlow 6f2595ce3c Fix multiple telnet client vulnerabilities.
Approved by:	so
Security:	FreeBSD-SA-19:12.telnet
Security:	CVE-2019-0053
2019-07-24 12:51:52 +00:00
Gordon Tetlow d837cbc676 Fix panic from Intel CPU vulnerability mitigation.
Approved by:	so
Security:	FreeBSD-EN-19:13.mds
2019-07-24 12:50:46 +00:00
Gordon Tetlow 163b32cc03 Update UPDATING and bump newvers.sh
Approved by:	so
Approved by:	re (implicit)
2019-07-03 00:04:50 +00:00
Gordon Tetlow 7e1927705e Fix privilege escalation in cd(4) driver.
Approved by:	so
Approved by:	re (implicit)
Security:	FreeBSD-SA-19:11.cd_ioctl
Security:	CVE-2019-5602
2019-07-03 00:03:55 +00:00
Gordon Tetlow 8f03f2c50e Fix kernel stack disclosure in UFS/FFS.
Approved by:	so
Security:	FreeBSD-SA-19:10.ufs
Security:	CVE-2019-5601
2019-07-03 00:02:16 +00:00
Gordon Tetlow c9e2fee214 Fix iconv buffer overflow.
Approved by:	so
Approved by:	re (implicit)
Security:	FreeBSD-SA-19:09.iconv
2019-07-03 00:00:39 +00:00
Gordon Tetlow 4366ef0463 Import tzdata 2019b.
Approved by:	so
Approved by:	re (implicit)
Security:	FreeBSD-EN-19:12.tzdata
2019-07-02 23:59:45 +00:00
Gordon Tetlow a5b15c47de Bump newvers.sh and add UPDATING block.
Approved by:	so
2019-05-14 23:22:30 +00:00
Gordon Tetlow 2b339970bb Mitigations for Microarchitectural Data Sampling.
Approved by:	so
Security:	FreeBSD-SA-19:07.mds
Security:	CVE-2018-12126
Security:	CVE-2018-12127
Security:	CVE-2018-12130
Security:	CVE-2019-11091
2019-05-14 23:20:16 +00:00
Gordon Tetlow 2201eec3c2 Fix ICMP/ICMP6 packet filter bypass in pf.
Approved by:	so
Security:	FreeBSD-SA-19:06.pf
Security:	CVE-2019-5598
2019-05-14 23:12:22 +00:00
Gordon Tetlow c498e68a37 Fix IPv6 fragment reassembly panic in pf
Approved by:	so
Security:	FreeBSD-SA-19:05.pf
Security:	CVE-2019-5597
2019-05-14 23:10:21 +00:00
Gordon Tetlow c13e80f2bf Update ntpd to 4.2.8p13 to fix authenticated denial of service.
Approved by:	so
Security:	FreeBSD-SA-19:04.ntp
Security:	CVE-2019-8936
2019-05-14 23:06:26 +00:00
Gordon Tetlow 85f5eb1e35 Update hostapd/wpa_supplicant to 2.8 to fix multiple vulnerabilities.
Approved by:	so
Security:	FreeBSD-SA-19:03.wpa
Security:	CVE-2019-9494
Security:	CVE-2019-9495
Security:	CVE-2019-9496
Security:	CVE-2019-9497
Security:	CVE-2019-9498
Security:	CVE-2019-9499
Security:	CVE-2019-11555
2019-05-14 22:59:32 +00:00
Gordon Tetlow fd6dca94f9 Fix partially matching relative paths in xinstall.
Approved by:	so
Security:	FreeBSD-EN-19:09.xinstall
2019-05-14 22:51:49 +00:00
Gordon Tetlow 97a6942ddd Import tzdata 2019a.
Approved by:	so
Security:	FreeBSD-EN-19:08.tzdata
2019-05-14 22:48:36 +00:00
Ed Maste 07b6fb557e UPDATING and newvers entries for 11.2-p9
Approved by:	so
Security:	FreeBSD-SA-19:01.syscall
2019-02-05 18:22:21 +00:00
Ed Maste 00508f1dd5 amd64: clear callee-preserved registers on syscall exit
Submitted by:	kib
Approved by:	so
Security:	CVE-2019-5595
Security:	FreeBSD-SA-19:01.syscall
2019-02-05 18:07:45 +00:00
Ed Maste 3b3c7a095e UPDATING and newvers entries for 11.2-p8
Approved by:	so
Security:	FreeBSD-EN-19:03.sqlite
Security:	FreeBSD-EN-19:04.tzdata
Security:	FreeBSD-EN-19:05.kqueue
2019-01-09 19:11:32 +00:00
Ed Maste bed29267f2 MFS11 r340904: Avoid unsynchronized updates to kn_status.
Approved by:	so
Security:	FreeBSD-EN-19:05.kqueue
2019-01-09 18:57:38 +00:00
Ed Maste d3c753cb08 MFS11 r342668: Import tzdata 2018h, 2018i
Approved by:	so
Security:	FreeBSD-EN-19:04.tzdata
2019-01-09 18:54:42 +00:00
Ed Maste bc0ac2b334 MFS11 r342292: MFC r333352 & r342183:
r333352: Update private sqlite from sqlite3-3.20.0 to sqlite3-3.23.1
r342183: Update sqlite3-3.23.1 --> sqlite3-3.26.0 (3260000)

PR:		234113
Approved by:	so
Security:	FreeBSD-EN-19:03.sqlite
2019-01-09 18:50:27 +00:00
Ed Maste b83109466b 11.2-RELEASE-p7 UPDATING
Approved by:	so
Security:	FreeBSD-SA-18:15.bootpd
Security:	FreeBSD-EN-18:16.ptrace
Security:	FreeBSD-EN-18:17.vm
Security:	FreeBSD-EN-18:18.zfs
2018-12-19 18:29:46 +00:00
Ed Maste 4c0e016a64 MFS11 r342229: bootpd: validate hardware type
Due to insufficient validation of network-provided data it may have been
possible for a malicious actor to craft a bootp packet which could cause
a stack buffer overflow.

admbugs:	850
Reported by:	Reno Robert
Reviewed by:	markj
Approved by:	so
Security:	FreeBSD-SA-18:15.bootpd
Sponsored by:	The FreeBSD Foundation
2018-12-19 18:22:25 +00:00
Ed Maste bf4ccb844f MFS11 r341828: Resolve a hang in ZFS during vnode reclaimation
This is caused by a deadlock between zil_commit() and zfs_zget()
  Add a way for zfs_zget() to break out of the retry loop in the common case

PR:		229614, 231117
Submitted by:	allanjude
Approved by:	so
Security:	FreeBSD-EN-18:18.zfs
Sponsored by:	Klara Systems, The FreeBSD Foundation
2018-12-19 18:05:50 +00:00
Ed Maste b2ec0c4e62 MFS11 r341401: Update the free page count when blacklisting pages.
PR:		231296
Submitted by:	markj
Approved by:	so
Security:	FreeBSD-EN-18:17.vm
Sponsored by:	The FreeBSD Foundation
2018-12-19 18:00:58 +00:00
Ed Maste 493017333c MFS11 r340290: Only clear a pending thread event if one is pending.
This fixes a panic when attaching to an already-stopped process.

Also do some other clean ups for control flow of sendsig section.

Submitted by:	markj
Approved by:	so
Security:	FreeBSD-EN-18:16.ptrace
Sponsored by:	The FreeBSD Foundation
2018-12-19 17:52:56 +00:00
Gordon Tetlow c4a0d65649 Fix insufficient bounds checking in bhyve(8) device model. [SA-18:14.bhyve]
Submitted by:   jhb
Reported by:    Reno Robert
Approved by:    so
Security:       FreeBSD-SA-18:14.bhyve
Security:       CVE-2018-17160
2018-12-04 18:38:32 +00:00
Gordon Tetlow 838f36ab82 Fix deferred kernel loading breaks loader password. [EN-18:15.loader]
Submitted by:	dteske
Approved by:	so
Security:	FreeBSD-EN-18:15.loader
2018-11-27 19:45:25 +00:00
Gordon Tetlow daa9fae317 Timezone database information update. [EN-18:14.tzdata]
Approved by:	so
Security:	FreeBSD-EN-18:14.tzdata
2018-11-27 19:44:39 +00:00
Gordon Tetlow 60a82dc462 Fix ICMP buffer underwrite. [EN-18:13.icmp]
Approved by:	so
Security:	FreeBSD-EN-18:13.icmp
Security:	CVE-2018-17156
2018-11-27 19:43:16 +00:00
Gordon Tetlow 795132c5e9 Fix multiple vulnerabilities in NFS server code. [SA-18:13.nfs]
Reported by:	Jakub Jirasek, Secunia Research at Flexera
Approved by:	so
Security:	FreeBSD-SA-18:13.nfs
Security:	CVE-2018-17157
Security:	CVE-2018-17158
Security:	CVE-2018-17159
2018-11-27 19:42:16 +00:00
Gordon Tetlow c8d1e91a2c Fix small kernel memory disclosures. [EN-18:12.mem]
Reported by:	Thomas Barabosch, Fraunhofer FKIE
Approved by:	so
Security:	FreeBSD-EN-18:12.mem
Security:	CVE-2018-17155
2018-09-27 18:36:30 +00:00
Gordon Tetlow 5261155503 Fix DoS in listen syscall over IPv6 socket. [EN-18:11.listen]
Reported by:	Jakub Jirasek, Secunia Research at Flexera
Approved by:	so
Security:	FreeBSD-EN-18:11.listen
Security:	CVE-2018-6925
2018-09-27 18:34:42 +00:00
Gordon Tetlow 9af40affa0 Fix NULL pointer dereference in freebsd4_getfsstat. [EN-18:10.syscall]
Reported by:	Thomas Barabosch, Fraunhofer FKIE
Approved by:	so
Security:	FreeBSD-EN-18:10.syscall
Security:	CVE-2018-17154
2018-09-27 18:32:14 +00:00
Gordon Tetlow 11dd4bdd89 Fix regression in IPv6 fragment reassembly. [EN-18:09.ip]
Approved by:	so
Security:	FreeBSD-EN-18:09.ip
2018-09-27 18:29:55 +00:00
Gordon Tetlow 27d6d228a4 Fix regression in Lazy FPU remediation. [EN-18:08.lazyfpu]
Approved by:	so
Security:	FreeBSD-EN-18:08.lazyfpu
2018-09-12 05:08:49 +00:00
Gordon Tetlow eaf3435c27 Fix improper elf header parsing. [SA-18:12.elf]
Approved by:	so
Security:	FreeBSD-SA-18:12.elf
Security:	CVE-2018-6924
2018-09-12 05:07:35 +00:00
Xin LI 03d43f6591 Revis manual pages. [SA-18:08.tcp]
Fix L1 Terminal Fault (L1TF) kernel information disclosure.
[SA-18:09.l1tf]

Fix resource exhaustion in IP fragment reassembly. [SA-18:10.ip]

Fix unauthenticated EAPOL-Key decryption vulnerability.
[SA-18:11.hostapd]

Approved by:	so
2018-08-15 02:30:11 +00:00
Xin LI 14eef7e86d Bump patch level and document them.
Approved by:	so
2018-08-06 20:39:27 +00:00
Jonathan T. Looney 0cb66c9e3b Address concerns about CPU usage while doing TCP reassembly.
Currently, the per-queue limit is a function of the receive buffer
size and the MSS.  In certain cases (such as connections with large
receive buffers), the per-queue segment limit can be quite large.
Because we process segments as a linked list, large queues may not
perform acceptably.

The better long-term solution is to make the queue more efficient.
But, in the short-term, we can provide a way for a system
administrator to set the maximum queue size.

We set the default queue limit to 100.  This is an effort to balance
performance with a sane resource limit.  Depending on their
environment, goals, etc., an administrator may choose to modify this
limit in either direction.

Approved by:	so
Security:	FreeBSD-SA-18:08.tcp
Security:	CVE-2018-6922
2018-08-06 17:47:47 +00:00
Glen Barber 617bf97c01 - Switch releng/11.2 to -RELEASE.
- Add the anticipated 11.2-RELEASE date to UPDATING.
- Set a static __FreeBSD_version.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-21 22:59:49 +00:00
Glen Barber 071c535fa2 Final touches to 11.2-RELEASE release notes:
- Remove an empty section that was left over from a previous commit
  to prune empty sections.
- Add a note about a late discovered issue with zfsd(8) (Bugzilla
  228750).  Fix a sentence stop while here.
- Document SA-18:07, which had been included in RC3.
- Fix FreeBSD versions in the installation.html page.

Approved by:	re (implicit, relnotes)
Sponsored by:	The FreeBSD Foundation
2018-06-21 18:13:04 +00:00
Glen Barber 7a83cdcae3 Update releng/11.2 to RC3 as part of the 11.2-RELEASE cycle.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-15 13:49:11 +00:00
Konstantin Belousov 6295c65827 MFC rr335072, r335089:
Enable eager FPU context switch on i386 and amd64.
CVE:	CVE-2018-3665

MFC r335131
Remove printf() in #NM handler.

MFC r335132:
Reorganize code flow in fpudna()/npxdna().

Approved by:	re (gjb)
2018-06-15 13:21:37 +00:00
Glen Barber de070ce817 MFS11 r335088 (dim):
MFC rr334886:
  Add missed libc++ entries to (Optional)ObsoleteFiles.inc

  Some of these were removed during the libc++ 5.0.0 import, others
  were added in the libc++ 6.0.0 import.

Approved by:	re (marius)
Sponsored by:	The FreeBSD Foundation
2018-06-14 17:42:36 +00:00
Glen Barber c6445771df MFS11 r334872 (ram):
MFC r334657:
  Issue: Utility hangs when  OCS_IOCTL_CMD_MGMT_GET_ALL called in
  parallel on port 0 and port 1.

  Fix: Using static structure for results is corrupting the second
  ioctl request. Removed static for results structure.

Approved by:	re (marius)
Sponsored by:	The FreeBSD Foundation
2018-06-14 17:42:19 +00:00
Glen Barber 858fc6e71a Switch releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
r334860.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-08 21:47:17 +00:00
Glen Barber 4bf4c60282 Fix the ordering of where '$bootable' is set in the second
variable setting, which was moved around as part of prior
commits that were subsequently reverted.

This is a direct commit to releng/11.2.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2018-06-08 21:46:11 +00:00
Glen Barber e6915a7bae Revert releng/11.2 back to RC1 temporarily, as an additional fix
for amd64 ISOs is required.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-08 21:44:15 +00:00
Glen Barber 38fd5f9ca0 Rename releng/11.2 to RC2 as part of the 11.2-RELEASE cycle, following
r334839.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-08 14:36:10 +00:00
Glen Barber 0704d8f30b Restore r332345 and r332346 from head, merged to stable/11 as
part of r333006, which was reverted in r334735.

r332345 fixes makefs(8) invocation after head revision r331843,
where makefs(8) was updated to be in sync with NetBSD.

r332346 fixes the $bootable variable position so the platformid
option is correctly applied.

This is a direct commit to releng/11.2, as these two revisions
were part of a total of four revisions merge to stable/11 (at
the time) in r333006.

Approved by:	re (bdrewery)
Sponsored by:	The FreeBSD Foundation
2018-06-08 14:35:27 +00:00
Glen Barber f973c27c38 Revert releng/11.2 back to RC1 due to an issue discovered with
amd64 ISOs, pending a fix to be committed shortly.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-08 14:00:12 +00:00
Glen Barber ae809ec577 Update releng/11.2 to RC2 as part of the 11.2-RELEASE cycle.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 23:59:19 +00:00
Michael Tuexen 5d24d071b4 MFstable/11 334801
Improve compliance with RFC 4895 and RFC 6458.

Silently dicard SCTP chunks which have been requested to be
authenticated but are received unauthenticated no matter if support
for SCTP authentication has been negotiated. This improves compliance
with RFC 4895.

When the application uses the SCTP_AUTH_CHUNK socket option to
request a chunk to be received in an authenticated way, enable
the SCTP authentication extension for the end-point. This improves
compliance with RFC 6458.

Discussed with:	Peter Lei
Approved by:	re (marius@)
2018-06-07 18:01:31 +00:00
Glen Barber 28a86bcb34 Fix a typo.
Spotted by:	adamw
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 17:08:36 +00:00
Glen Barber d336f39894 Add xml:id attributes for diff reduction.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:35:09 +00:00
Glen Barber 98f9be6299 Fix a grammatical error.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:31:05 +00:00
Glen Barber 127879c79e Connect the installation page to the build.
Update the release version in installation/article.xml.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:26:28 +00:00
Glen Barber b87af33c49 Document pkg(8) version.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:21:16 +00:00
Glen Barber 8ca1e5e8a9 relnotes/article.xml:
- Remove empty sections.
- Move the 'hardware support' section, containing only
  driver information, to the 'device drivers' section.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:21:15 +00:00
Glen Barber a2beabe890 Document r334789, dhclient(8) allow to superscede interface-mtu
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:21:14 +00:00
Glen Barber 86538b9112 errata/article.xml:
- Prune stale entries from 11.1-RELEASE.
- Add an xml:id for diff reduction.

hardware/article.xml:
- Add an xml:id for diff reduction.

installation/article.xml:
- Add an xml:id for diff reduction.

readme/article.xml:
- Fix a malformed URL and mailing list reference.

readme/article.xml:
- Update the xml:id to match that used by readme/article.xml
  for consistency.

release.ent:
- Update versions, and switch from 'snapshot' to 'release'.

security.xml:
- Remove reference to 10.x.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-07 16:21:12 +00:00
Marius Strobl 5de478ffc6 MFC: r334443 (by cem@) MF stable/11: r334787
dhclient(8): allow to supersede interface-mtu option

In some cases broken DHCP servers might send invalid MTU value, so allow to
use 'supersede' in dhclient.conf to override this. When superseded value is
0, MTU value is not updated at all.

PR:		206721
Submitted by:	novel@
Reported by:	<jimp AT pfsense.org>
Approved by:	re (gjb)
Relnotes:	yes (potentially surprising behavior change w/ broken dhcpd mtu)
Differential Revision:	https://reviews.freebsd.org/D15484
2018-06-07 15:51:23 +00:00
Michael Tuexen 7cf8e0dc83 MFstable/11 334732:
Don't overflow a buffer if we receive an INIT or INIT-ACK chunk
without a RANDOM parameter but with a CHUNKS or HMAC-ALGO parameter.
Please note that sending this combination violates the specification.

Thanks to Ronald E. Crane for reporting the issue for the userland
stack.

Approved by:	re (gjb@)
2018-06-06 22:34:20 +00:00
Michael Tuexen a3aad3b17d MFstable/11 334731
Limit the retransmission timer for SYN-ACKs by TCPTV_REXMTMAX.

Use the same logic to handle the SYN-ACK retransmission when sent from
the syn cache code as when sent from the main code.

Approved by:	re (gjb@)
Sponsored by:	Netflix, Inc.
2018-06-06 22:02:44 +00:00
Michael Tuexen a99194d3fa MFstable/11 r334730
Ensure net.inet.tcp.syncache.rexmtlimit is limited by TCP_MAXRXTSHIFT.

If the sysctl variable is set to a value larger than TCP_MAXRXTSHIFT+1,
the array tcp_syn_backoff[] is accessed out of bounds.

Discussed with:	jtl@
Approved by:	re (gjb)
Sponsored by:	Netflix, Inc.
2018-06-06 21:23:42 +00:00
Glen Barber 78c3d60fd2 Remove the r333006 entry following r334735.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-06 20:32:39 +00:00
Glen Barber 208776beed Revert r333006:
This revision implemented hybrid ISOs for the amd64
 architecture, however it was discovered to have caused
 a regression in booting legacy-mode (BIOS/CSM).

 This restores the way ISOs were previously created, as
 the cause (and differences between head and stable/11
 and releng/11.2) have not been entirely identified.

Approved by:	re (marius)
Sponsored by:	The FreeBSD Foundation
2018-06-06 20:31:15 +00:00
Michael Tuexen 27f444ce4d MFstable/11 r334728:
Ensure we are not dereferencing a NULL pointer.

CID:		1385266
Approved by: re (marius@)
2018-06-06 20:28:17 +00:00
Glen Barber 5d5eef26f5 Fix two grammatical errors.
Reported by:	adamw
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 22:27:36 +00:00
Glen Barber c35c601593 Add xml:id to the article tag for diff reduction when regenerating
the relnotes page.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:55:40 +00:00
Glen Barber 69308a073c Document r333343, ixl(4) version 1.9.9-k.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:26 +00:00
Glen Barber 0c9cec7846 Adjust wording for r334444 to be more consistent with the text
for i386 memstick images.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:25 +00:00
Glen Barber 11987c4c87 Document r333417, smartpqi(4) addition.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:24 +00:00
Glen Barber 49cc5e72fb Document r333166, Apollo Lake boot issue fix.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:23 +00:00
Glen Barber 00d8b1e3d8 Document r334444, amd64 memstick images now use MBR instead of GPT.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:22 +00:00
Glen Barber 57bff0b0fc Document r334458, libxo(3) version 0.9.0.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:21 +00:00
Glen Barber a19e82db21 Document r332040, ocs_fc(4) addition.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:20 +00:00
Glen Barber 9e125e1d12 Document r331058, ng_pppoe(4) user-supplied Host-Uniq tag support.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:19 +00:00
Glen Barber 65ee15f155 Document r329581, fix to ICMPv6 redirects.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:18 +00:00
Glen Barber d94c62263f Document r329010, loader(8) quote parsing improvements.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:17 +00:00
Glen Barber 5b73786f7d Document r327920, SW_WATCHDOG is now dynamic.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:16 +00:00
Glen Barber e6b9965e3f Document r325730, ipfw(4) Dummynet AQM packet marking L2/L3.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:15 +00:00
Glen Barber 9df472ca75 Document r324175, ng_iface(4) system crash fix.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:14 +00:00
Glen Barber f55756b7e4 Document r323447, support for multiple realtime clocks.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:13 +00:00
Glen Barber b89c884834 Document r322340, fdescfs(5) updates for Linux-specific /dev/fd
and /proc/self/fd behavior.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:12 +00:00
Glen Barber da0f09bb1f Document r321519, boot code and loader check for unsupported ZFS
feature flags.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:11 +00:00
Glen Barber 7c1f7e6d34 Document r321007, msul support in Linuxulator.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:10 +00:00
Glen Barber 299ba767db Document r330733, zfsd(8) updated to work with any GEOM provider.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:09 +00:00
Glen Barber 8da77379a5 Fix missing "_max" in the r326322 entry.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:08 +00:00
Glen Barber 8c9aa6c38c Document r326322, p1003_1b.aio_listio_max is now a tunable.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-05 21:41:06 +00:00
Navdeep Parhar d740e20d96 Merge r334562 from stable/11 to releng/11.2. r334562 MFC'd the
following revisions to stable/11: r333650, r333652, r333682, r334406,
r334409-r334410, and r334489.

r333650:
cxgbe(4): Claim some more T5 and T6 boards.

r333652:
cxgbe(4): Add support for two more flash parts.

r333682:
cxgbe(4): Fall back to a failsafe configuration built into the firmware
if an error is reported while pre-processing the configuration file that
the driver attempted to use.

Also, allow the user to explicitly use the built-in configuration with
hw.cxgbe.config_file="built-in"

r334406:
cxgbe(4): Consider all supported speeds when building the ifmedia list
for a port.  Fix other related issues while here:
- Require port lock for access to link_config.
- Allow 100Mbps operation by tracking the speed in Mbps.  Yes, really.
- New port flag to indicate that the media list is immutable.  It will
  be used in future refinements.

This also fixes a bug where the driver reports incorrect media with
recent firmwares.

r334409:
cxgbe(4): Implement ifm_change callback.

r334410:
cxgbe(4): Use ifm for ifmedia just like the rest of the kernel.

No functional change.

r334489:
cxgbe(4): Include full duplex mediaopt in media that can be reported as
active.  Always report full duplex in active media.

Approved by:	re@ (gjb@, kib@)
Sponsored by:	Chelsio Communications
2018-06-04 20:34:53 +00:00
Glen Barber 43f072d8f1 Switch releng/11.2 back to RC1 following r334469.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-01 01:35:54 +00:00
Glen Barber 83d2a5e85c Switch the dvd1 pkg(8) configuration to use the quarterly branch,
as part of the BETA->RC switch.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-01 01:34:37 +00:00
Glen Barber dcf3e88028 Rename releng/11.2 back to BETA3 temporarily, as I missed a file
that needs updating when branching, because I am an idiot.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-01 01:33:48 +00:00
Glen Barber f3563ad3d4 Copy stable/11@r334458 to releng/11.2 as part of the 11.2-RELEASE
cycle.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2018-06-01 00:22:49 +00:00
1013 changed files with 181416 additions and 49459 deletions

No files matched your search

+5
View File
@@ -38,6 +38,11 @@
# xargs -n1 | sort | uniq -d;
# done
# 20180613: obsolete libc++ files missed from the 5.0.0 import
OLD_FILES+=usr/include/c++/v1/__refstring
OLD_FILES+=usr/include/c++/v1/__undef_min_max
OLD_FILES+=usr/include/c++/v1/tr1/__refstring
OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max
# 20180513: remove DTrace scripts made obsolete by dwatch(1)
OLD_FILES+=usr/share/dtrace/watch_execve
OLD_FILES+=usr/share/dtrace/watch_kill
+180
View File
@@ -16,6 +16,186 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
the tip of head, and then rebuild without this option. The bootstrap process
from older version of current across the gcc/clang cutover is a bit fragile.
20191023 p15 FreeBSD-EN-19:18.tzdata
Import tzdata 2019c. [EN-19:18.tzdata]
20190820 p14 FreeBSD-SA-19:22.mbuf
FreeBSD-SA-19:23.midi
FreeBSD-SA-19:24.mqueuefs
Fix IPv6 remote denial of service. [SA-19:22.mbuf]
Fix kernel memory disclosure from /dev/midistat. [SA-19:23.midi]
Fix reference count overflow in mqueuefs. [SA-19:24.mqueuefs]
20190806 p13 FreeBSD-EN-19:15.libunwind
FreeBSD-SA-19:18.bzip2
FreeBSD-SA-19:19.mldv2
FreeBSD-SA-19:20.bsnmp
FreeBSD-SA-19:21.bhyve
Fix incorrect exception handling. [EN-19:15.libunwind]
Fix multiple vulnerabilities in bzip2. [SA-19:18.bzip2]
Fix ICMPv6 / MLDv2 out-of-bounds memory access. [SA-19:19.mldv2]
Fix insufficient message length validation in bsnmp library.
[SA-19:20.bsnmp]
Fix insufficient validation of guest-supplied data (e1000 device).
[SA-19:21.bhyve]
20190724 p12 FreeBSD-EN-19:13.mds
FreeBSD-SA-19:12.telnet
FreeBSD-SA-19:13.pts
FreeBSD-SA-19:14.freebsd32
FreeBSD-SA-19:15.mqueuefs
FreeBSD-SA-19:16.bhyve
FreeBSD-SA-19:17.fd
Fix panic from Intel CPU vulnerability mitigation. [EN-19:13.mds]
Fix multiple telnet client vulnerabilities. [SA-19:12.telnet]
Fix pts write-after-free. [SA-19:13.pts]
Fix kernel memory disclosure in freebsd32_ioctl. [SA-19:14.freebsd32]
Fix reference count overflow in mqueuefs. [SA-19:15.mqueuefs]
Fix byhve out-of-bounds read in XHCI device. [SA-19:16.bhyve]
Fix file descriptor reference count leak. [SA-19:17.fd]
20190702 p11 FreeBSD-EN-19:12.tzdata
FreeBSD-SA-19:09.iconv
FreeBSD-SA-19:10.ufs
FreeBSD-SA-19:11.cd_ioctl
Import tzdata 2019b. [EN-19:12.tzdata]
Fix iconv buffer overflow. [SA-19:09.iconv]
Fix kernel stack disclosure in UFS/FFS. [SA-19:10.ufs]
Fix privilege escalation in cd(4) driver. [SA-19:11.cd_ioctl]
20190514 p10 FreeBSD-EN-19:08.tzdata
FreeBSD-EN-19:09.xinstall
FreeBSD-SA-19:03.wpa
FreeBSD-SA-19:04.ntp
FreeBSD-SA-19:05.pf
FreeBSD-SA-19:06.pf
FreeBSD-SA-19:07.mds
Import tzdata 2019a. [EN-19:08.tzdata]
Fix install with partially matching relative paths. [EN-19:09.xinstall]
Fix multiple vulnerabilities in hostapd/wpa_supplicant. [SA-19:03.wpa]
Fix authenticated denial of service in ntpd. [SA-19:04.ntp]
Fix IPv6 fragment reassembly in pf. [SA-19:05.pf]
Fix ICMP/ICMP6 packet filter bypass in pf. [SA-19:06.pf]
Add mitigations for Microarchitectural Data Sampling. [SA-19:07.mds]
20190205 p9 FreeBSD-SA-19:01.syscall
amd64: clear callee-preserved registers on syscall exit
[SA-19:01.syscall]
20190109 p8 FreeBSD-EN-19:03.sqlite
FreeBSD-EN-19:04.tzdata
FreeBSD-EN-19:05.kqueue
Update sqlite3-3.20.0 --> sqlite3-3.26.0 (3260000) [EN-19:03.sqlite]
Import tzdata 2018h, 2018i [EN-19:04.tzdata]
Avoid unsynchronized updates to kn_status. [EN-19:05.kqueue]
20181219 p7 FreeBSD-SA-18:15.bootpd
FreeBSD-EN-18:16.ptrace
FreeBSD-EN-18:17.vm
FreeBSD-EN-18:18.zfs
bootpd: validate hardware type [SA-18:15.bootpd]
Only clear a pending thread event if one is pending. [EN-18:16.ptrace]
Update the free page count when blacklisting pages. [EN-18:17.vm]
Resolve a hang in ZFS during vnode reclamation [EN-18:18.zfs]
20181204 p6 FreeBSD-SA-18:14.bhyve
Fix insufficient bounds checking in bhyve(8) device model.
[SA-18:14.bhyve]
20181127 p5 FreeBSD-SA-18:13.nfs
FreeBSD-EN-18:13.icmp
FreeBSD-EN-18:14.tzdata
FreeBSD-EN-18:15.loader
Fix multiple vulnerabilities in NFS server code. [SA-18:13.nfs]
Fix ICMP buffer underwrite. [EN-18:13.icmp]
Timezone database information update. [EN-18:14.tzdata]
Fix deferred kernel loading breaks loader password. [EN-18:15.loader]
20180927 p4 FreeBSD-EN-18:09.ip
FreeBSD-EN-18:10.syscall
FreeBSD-EN-18:11.listen
FreeBSD-EN-18:12.mem
Fix regression in IPv6 fragment reassembly. [EN-18:09.ip]
Fix NULL pointer dereference in freebsd4_getfsstat. [EN-18:10.syscall]
Fix DoS in listen syscall over IPv6 socket. [EN-18:11.listen]
Fix small kernel memory disclosures. [EN-18:12.mem]
20180912 p3 FreeBSD-SA-18:12.elf
FreeBSD-EN-18:08.lazyfpu
Fix improper elf header parsing. [SA-18:12.elf]
Fix regression in Lazy FPU remediation. [EN-18:08.lazyfpu]
20180814 p2 FreeBSD-SA-18:08.tcp [revised]
FreeBSD-SA-18:09.l1tf
FreeBSD-SA-18:10.ip
FreeBSD-SA-18:11.hostapd
Revise manual pages. [SA-18:08.tcp]
Fix L1 Terminal Fault (L1TF) kernel information disclosure.
[SA-18:09.l1tf]
Fix resource exhaustion in IP fragment reassembly. [SA-18:10.ip]
Fix unauthenticated EAPOL-Key decryption vulnerability.
[SA-18:11.hostapd]
20180806 p1 FreeBSD-SA-18:08.tcp
Fix resource exhaustion in TCP reassembly.
20180627:
11.2-RELEASE.
20180504:
The tz database (tzdb) has been updated to 2018e. This version more
correctly models time stamps in time zones with negative DST such as
+5
View File
@@ -100,6 +100,11 @@ asn_get_header(struct asn_buf *b, u_char *type, asn_len_t *len)
*len = *b->asn_cptr++;
b->asn_len--;
}
if (*len > b->asn_len) {
asn_error(b, "len %u exceeding asn_len %u", *len, b->asn_len);
return (ASN_ERR_EOBUF);
}
return (ASN_ERR_OK);
}
+15 -2
View File
@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2.
Izdebski.
* Make the documentation build on Ubuntu 10.04
1.0.7 (27 Jun 19)
~~~~~~~~~~~~~~~~~
* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH
* bzip2: Fix return value when combining --test,-t and -q.
* bzip2recover: Fix buffer overflow for large argv[0]
* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189)
* Make sure nSelectors is not out of range (CVE-2019-12900)
+2 -2
View File
@@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Julian Seward, jseward@bzip.org
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Julian Seward, jseward@acm.org
bzip2/libbzip2 version 1.0.7 of 27 June 2019
--------------------------------------------------------------------------
+8 -28
View File
@@ -6,8 +6,8 @@ This version is fully compatible with the previous public releases.
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
@@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.
It's difficult for me to support compilation on all these platforms.
My approach is to collect binaries for these platforms, and put them
on the master web site (http://www.bzip.org). Look there. However
on the master web site (https://sourceware.org/bzip2/). Look there. However
(FWIW), bzip2-1.0.X is very standard ANSI C and should compile
unmodified with MS Visual C. If you have difficulties building, you
might want to read README.COMPILATION.PROBLEMS.
@@ -161,43 +161,22 @@ WHAT'S NEW IN 0.9.5 ?
* Many small improvements in file and flag handling.
* A Y2K statement.
WHAT'S NEW IN 1.0.0 ?
WHAT'S NEW IN 1.0.x ?
See the CHANGES file.
WHAT'S NEW IN 1.0.2 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.3 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.4 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.5 ?
See the CHANGES file.
WHAT'S NEW IN 1.0.6 ?
See the CHANGES file.
I hope you find bzip2 useful. Feel free to contact me at
jseward@bzip.org
jseward@acm.org
if you have any suggestions or queries. Many people mailed me with
comments, suggestions and patches after the releases of bzip-0.15,
bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this
feedback. I thank you for your comments.
bzip2's "home" is http://www.bzip.org/
bzip2's "home" is https://sourceware.org/bzip2/
Julian Seward
jseward@bzip.org
jseward@acm.org
Cambridge, UK.
18 July 1996 (version 0.15)
@@ -213,3 +192,4 @@ Cambridge, UK.
20 December 2006 (bzip2, version 1.0.4)
10 December 2007 (bzip2, version 1.0.5)
6 Sept 2010 (bzip2, version 1.0.6)
27 June 2019 (bzip2, version 1.0.7)
+3 -3
View File
@@ -2,8 +2,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -12,7 +12,7 @@ This program is released under the terms of the license contained
in the file LICENSE.
------------------------------------------------------------------
bzip2-1.0.6 should compile without problems on the vast majority of
bzip2 should compile without problems on the vast majority of
platforms. Using the supplied Makefile, I've built and tested it
myself for x86-linux and amd64-linux. With makefile.msc, Visual C++
6.0 and nmake, you can build a native Win32 version too. Large file
+5 -5
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
bhtab [ 0 .. 2+(nblock/32) ] destroyed
*/
#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31))
#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31))
#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31)))
#define WORD_BH(zz) bhtab[(zz) >> 5]
#define UNALIGNED_BH(zz) ((zz) & 0x01f)
+4 -4
View File
@@ -1,6 +1,6 @@
.TH bzip2 1
.SH NAME
bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6
bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7
.br
bzcat \- decompresses files to stdout
.br
@@ -404,7 +404,7 @@ I/O error messages are not as helpful as they could be.
tries hard to detect I/O errors and exit cleanly, but the details of
what the problem is sometimes seem rather misleading.
This manual page pertains to version 1.0.6 of
This manual page pertains to version 1.0.7 of
.I bzip2.
Compressed data created by this version is entirely forwards and
backwards compatible with the previous public releases, versions
@@ -426,9 +426,9 @@ with MaybeUInt64 set to be an unsigned 64-bit integer.
.SH AUTHOR
Julian Seward, jsewardbzip.org.
Julian Seward, jseward@acm.org.
http://www.bzip.org
https://sourceware.org/bzip2/
The ideas embodied in
.I bzip2
+16 -14
View File
@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -554,7 +554,7 @@ static
Bool testStream ( FILE *zStream )
{
BZFILE* bzf = NULL;
Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i;
Int32 bzerr, bzerr_dummy, ret, streamNo, i;
UChar obuf[5000];
UChar unused[BZ_MAX_UNUSED];
Int32 nUnused;
@@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream )
streamNo++;
while (bzerr == BZ_OK) {
nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler;
}
if (bzerr != BZ_STREAM_END) goto errhandler;
@@ -749,7 +749,7 @@ void panic ( const Char* s )
"\n%s: PANIC -- internal consistency error:\n"
"\t%s\n"
"\tThis is a BUG. Please report it to me at:\n"
"\tjseward@bzip.org\n",
"\tjseward@acm.org\n",
progName, s );
showFileNames();
cleanUpAndFail( 3 );
@@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (1) and (2).\n"
" \n"
" If you suspect this is a bug in bzip2, or are unsure about (1)\n"
" or (2), feel free to report it to me at: jseward@bzip.org.\n"
" or (2), feel free to report it to me at: jseward@acm.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n"
@@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
" The user's manual, Section 4.3, has more info on (2) and (3).\n"
" \n"
" If you suspect this is a bug in bzip2, or are unsure about (2)\n"
" or (3), feel free to report it to me at: jseward@bzip.org.\n"
" or (3), feel free to report it to me at: jseward@acm.org.\n"
" Section 4.3 of the user's manual describes the info a useful\n"
" bug report should have. If the manual is available on your\n"
" system, please try and read it before mailing me. If you don't\n"
@@ -1609,7 +1609,7 @@ void license ( void )
" \n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms set out in the LICENSE file, which is included\n"
" in the bzip2-1.0.6 source distribution.\n"
" in the bzip2 source distribution.\n"
" \n"
" This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -2005,12 +2005,14 @@ IntNative main ( IntNative argc, Char *argv[] )
testf ( aa->name );
}
}
if (testFailsExist && noisy) {
fprintf ( stderr,
"\n"
"You can use the `bzip2recover' program to attempt to recover\n"
"data from undamaged sections of corrupted files.\n\n"
);
if (testFailsExist) {
if (noisy) {
fprintf ( stderr,
"\n"
"You can use the `bzip2recover' program to attempt to recover\n"
"data from undamaged sections of corrupted files.\n\n"
);
}
setExit(2);
exit(exitValue);
}
+6 -4
View File
@@ -7,8 +7,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -309,11 +309,12 @@ Int32 main ( Int32 argc, Char** argv )
UInt32 buffHi, buffLo, blockCRC;
Char* p;
strcpy ( progName, argv[0] );
strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
progName[BZ_MAX_FILENAME-1]='\0';
inFileName[0] = outFileName[0] = 0;
fprintf ( stderr,
"bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" );
"bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" );
if (argc != 2) {
fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
@@ -457,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
bsPutUInt32 ( bsWr, blockCRC );
bsClose ( bsWr );
outFile = NULL;
}
if (wrBlock >= rbCtr) break;
wrBlock++;
+3 -3
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -47,7 +47,7 @@ void BZ2_bz__AssertH__fail ( int errcode )
fprintf(stderr,
"\n\nbzip2/libbzip2: internal error number %d.\n"
"This is a bug in bzip2/libbzip2, %s.\n"
"Please report it to me at: jseward@bzip.org. If this happened\n"
"Please report it to me at: jseward@acm.org. If this happened\n"
"when you were using some program which uses libbzip2 as a\n"
"component, you should also report this bug to the author(s)\n"
"of that program. Please make an effort to report this bug;\n"
+2 -2
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+3 -3
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -36,7 +36,7 @@
/*-- General stuff. --*/
#define BZ_VERSION "1.0.6, 6-Sept-2010"
#define BZ_VERSION "1.0.7, 27-Jun-2019"
typedef char Char;
typedef unsigned char Bool;
+2 -2
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+2 -2
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+4 -4
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s )
/*--- Now the selectors ---*/
GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR);
GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
for (i = 0; i < nSelectors; i++) {
j = 0;
while (True) {
+2 -2
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+2 -2
View File
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+2 -2
View File
@@ -13,8 +13,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+2 -2
View File
@@ -17,8 +17,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
bzip2/libbzip2 version 1.0.6 of 6 September 2010
Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
bzip2/libbzip2 version 1.0.7 of 27 June 2019
Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
+1 -1
View File
@@ -1,5 +1,5 @@
Checking test results. If any of the four "cmp"s which follow
report any differences, something is wrong. If you can't easily
figure out what, please let me know (jseward@bzip.org).
figure out what, please let me know (jseward@acm.org).
@@ -68,7 +68,9 @@ void EHHeaderParser<A>::decodeEHHdr(A &addressSpace, pint_t ehHdrStart,
ehHdrInfo.eh_frame_ptr =
addressSpace.getEncodedP(p, ehHdrEnd, eh_frame_ptr_enc, ehHdrStart);
ehHdrInfo.fde_count =
addressSpace.getEncodedP(p, ehHdrEnd, fde_count_enc, ehHdrStart);
fde_count_enc == DW_EH_PE_omit
? 0
: addressSpace.getEncodedP(p, ehHdrEnd, fde_count_enc, ehHdrStart);
ehHdrInfo.table = p;
}
+22 -29
View File
@@ -1,16 +1,15 @@
This file is automatically generated from html/copyright.html
Copyright Notice
jpg "Clone me," says Dolly sheepishly.
Last update: 2-Jan-2017 11:58 UTC
_________________________________________________________________
The following copyright notice applies to all files collectively
called the Network Time Protocol Version 4 Distribution. Unless
specifically declared otherwise in an individual file, this entire
notice applies as if the text was explicitly included in the file.
__________________________________________________________________
The following copyright notice applies to all files collectively called
the Network Time Protocol Version 4 Distribution. Unless specifically
declared otherwise in an individual file, this entire notice applies as
if the text was explicitly included in the file.
***********************************************************************
* *
* 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
Protocol Distribution Version 4 and are acknowledged as authors of
this work.
Protocol Distribution Version 4 and are acknowledged as authors of this
work.
1. [1]Takao Abe <[email protected]> Clock driver for JJY receivers
2. [2]Mark Andrews <[email protected]> Leitch atomic clock
controller
3. [3]Bernd Altmeier <[email protected]> hopf Elektronik serial
line and PCI-bus devices
3. [3]Bernd Altmeier <[email protected]> hopf Elektronik serial line
and PCI-bus devices
4. [4]Viraj Bais <[email protected]> and [5]Clayton Kirkwood
<[email protected]> port to WindowsNT 3.5
5. [6]Michael Barone <michael,[email protected]> GPSVME fixes
@@ -84,13 +83,12 @@ This file is automatically generated from html/copyright.html
<[email protected]> IPv6 support
12. [13]Reg Clemens <[email protected]> Oncore driver (Current maintainer)
13. [14]Steve Clift <[email protected]> OMEGA clock driver
14. [15]Casey Crellin <[email protected]> vxWorks (Tornado) port and
help with target configuration
14. [15]Casey Crellin <[email protected]> vxWorks (Tornado) port and help
with target configuration
15. [16]Sven Dietrich <[email protected]> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
16. [17]John A. Dundas III <[email protected]> Apple A/UX port
17. [18]Torsten Duwe <[email protected]> Linux
port
17. [18]Torsten Duwe <[email protected]> Linux port
18. [19]Dennis Ferguson <[email protected]> foundation code for
NTP Version 2 as specified in RFC-1119
19. [20]John Hay <[email protected]> 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
36. [39]Danny Mayer <[email protected]>Network I/O, Windows Port, Code
Maintenance
37. [40]David L. Mills <[email protected]> Version 4 foundation,
precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19,
22, 36
37. [40]David L. Mills <[email protected]> Version 4 foundation, precision
kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36
38. [41]Wolfgang Moeller <[email protected]> VMS port
39. [42]Jeffrey Mogul <[email protected]> ntptrace utility
40. [43]Tom Moore <[email protected]> i386 svr4 port
@@ -136,22 +133,18 @@ This file is automatically generated from html/copyright.html
44. [48]Rainer Pruy <[email protected]>
monitoring/trap scripts, statistics file handling
45. [49]Dirce Richards <[email protected]> Digital UNIX V4.0 port
46. [50]Wilfredo Sánchez <[email protected]> added support for
NetInfo
46. [50]Wilfredo Sánchez <[email protected]> added support for NetInfo
47. [51]Nick Sayer <[email protected]> SunOS streams modules
48. [52]Jack Sasportas <[email protected]> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
49. [53]Ray Schnitzler <[email protected]> Unixware1 port
50. [54]Michael Shields <[email protected]> USNO clock driver
51. [55]Jeff Steinman <[email protected]> Datum PTS clock
driver
51. [55]Jeff Steinman <[email protected]> Datum PTS clock driver
52. [56]Harlan Stenn <[email protected]> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
53. [57]Kenneth Stone <[email protected]> HP-UX port
54. [58]Ajit Thyagarajan <[email protected]>IP multicast/anycast
support
55. [59]Tomoaki TSURUOKA <[email protected]>TRAK clock
driver
54. [58]Ajit Thyagarajan <[email protected]>IP multicast/anycast support
55. [59]Tomoaki TSURUOKA <[email protected]>TRAK clock driver
56. [60]Brian Utterback <[email protected]> General codebase,
Solaris issues
57. [61]Loganaden Velvindron <[email protected]> Sandboxing
@@ -160,7 +153,7 @@ This file is automatically generated from html/copyright.html
TrueTime clock driver
59. [63]Ulrich Windl <[email protected]> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
__________________________________________________________________
References
+113 -4
View File
@@ -1,4 +1,113 @@
---
(4.2.8p13) 2019/03/07 Released by Harlan Stenn <[email protected]>
* [Sec 3565] Crafted null dereference attack in authenticated
mode 6 packet <[email protected]>
- reported by Magnus Stubman
* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <[email protected]>
- applied patch by Ian Lepore
* [Bug 3558] Crash and integer size bug <[email protected]>
- isolate and fix linux/windows specific code issue
* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <[email protected]>
- provide better function for incremental string formatting
* [Bug 3555] Tidy up print alignment of debug output from ntpdate <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3554] config revoke stores incorrect value <[email protected]>
- original finding by Gerry Garvey, additional cleanup needed
* [Bug 3549] Spurious initgroups() error message <[email protected]>
- patch by Christous Zoulas
* [Bug 3548] Signature not verified on windows system <[email protected]>
- finding by Chen Jiabin, plus another one by me
* [Bug 3541] patch to fix STA_NANO struct timex units <[email protected]>
- applied patch by Maciej Szmigiero
* [Bug 3540] Cannot set minsane to 0 anymore <[email protected]>
- applied patch by Andre Charbonneau
* [Bug 3539] work_fork build fails when droproot is not supported <[email protected]>
- applied patch by Baruch Siach
* [Bug 3538] Build fails for no-MMU targets <[email protected]>
- applied patch by Baruch Siach
* [Bug 3535] libparse won't handle GPS week rollover <[email protected]>
- 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) <[email protected]>
- 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 <[email protected]>, reported by GGarvey.
- --enable-bug3527-fix support by HStenn
* [Bug 3526] Incorrect poll interval in packet <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3471] Check for openssl/[ch]mac.h. <[email protected]>
- added missing check, reported by Reinhard Max <[email protected]>
* [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 <[email protected]>
* [Sec 3505] CVE-2018-12327 - Arbitrary Code Execution Vulnerability
- fixed stack buffer overflow in the openhost() command-line call
of NTPQ/NTPDC <[email protected]>
* [Sec 3012] noepeer tweaks. <[email protected]>
* [Bug 3521] Fix a logic bug in the INVALIDNAK checks. <[email protected]>
* [Bug 3509] Add support for running as non-root on FreeBSD, Darwin,
other TrustedBSD platforms
- applied patch by Ian Lepore <[email protected]>
* [Bug 3506] Service Control Manager interacts poorly with NTPD <[email protected]>
- changed interaction with SCM to signal pending startup
* [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3484] ntpq response from ntpd is incorrect when REFID is null <[email protected]>
- rework of ntpq 'nextvar()' key/value parsing
* [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) <[email protected]>
- applied patch by Gerry Garvey (with mods)
* [Bug 3480] Refclock sample filter not cleared on clock STEP <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <[email protected]>
- applied patch by Gerry Garvey (with mods)
* [Bug 3476]ctl_putstr() sends empty unquoted string [...] <[email protected]>
- applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though
* [Bug 3475] modify prettydate() to suppress output of zero time <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3474] Missing pmode in mode7 peer info response <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3471] Check for openssl/[ch]mac.h. HStenn.
- add #define ENABLE_CMAC support in configure. HStenn.
* [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL <[email protected]>
* [Bug 3469] Incomplete string compare [...] in is_refclk_addr <[email protected]>
- patch by Stephen Friedl
* [Bug 3467] Potential memory fault in ntpq [...] <[email protected]>
- fixed IO redirection and CTRL-C handling in ntq and ntpdc
* [Bug 3465] Default TTL values cannot be used <[email protected]>
* [Bug 3461] refclock_shm.c: clear error status on clock recovery <[email protected]>
- initial patch by Hal Murray; also fixed refclock_report() trouble
* [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. <[email protected]>
* [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
- According to Brooks Davis, there was only one location <[email protected]>
* [Bug 3449] ntpq - display "loop" instead of refid [...] <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3445] Symmetric peer won't sync on startup <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey,
with modifications
New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c.
* [Bug 3434] ntpd clears STA_UNSYNC on start <[email protected]>
- applied patch by Miroslav Lichvar
* [Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov.
* [Bug 3121] Drop root privileges for the forked DNS worker <[email protected]>
- integrated patch by Reinhard Max
* [Bug 2821] minor build issues <[email protected]>
- applied patches by Christos Zoulas, including real bug fixes
* html/authopt.html: cleanup, from <[email protected]>
* ntpd/ntpd.c: DROPROOT cleanup. <[email protected]>
* Symmetric key range is 1-65535. Update docs. <[email protected]>
* html/authentic.html: cleanup, from <[email protected]>
---
(4.2.8p11) 2018/02/27 Released by Harlan Stenn <[email protected]>
* [Sec 3454] Unauthenticated packet can reset authenticated interleave
associations. HStenn.
@@ -14,16 +123,16 @@
- applied patch by Sean Haugh
* [Bug 3452] PARSE driver prints uninitialized memory. <[email protected]>
* [Bug 3450] Dubious error messages from plausibility checks in get_systime()
- removed error log caused by rounding/slew, ensured postcondition <[email protected]>
- removed error log caused by rounding/slew, ensured postcondition <[email protected]>
* [Bug 3447] AES-128-CMAC (fixes) <[email protected]>
- refactoring the MAC code, too
* [Bug 3441] Validate the assumption that AF_UNSPEC is 0. [email protected]
* [Bug 3439] When running multiple commands / hosts in ntpq... <[email protected]>
- applied patch by ggarvey
- applied patch by ggarvey
* [Bug 3438] Negative values and values > 999 days in... <[email protected]>
- applied patch by ggarvey (with minor mods)
- applied patch by ggarvey (with minor mods)
* [Bug 3437] ntpd tries to open socket with AF_UNSPEC domain
- applied patch (with mods) by Miroslav Lichvar <[email protected]>
- applied patch (with mods) by Miroslav Lichvar <[email protected]>
* [Bug 3435] anchor NTP era alignment <[email protected]>
* [Bug 3433] sntp crashes when run with -a. <[email protected]>
* [Bug 3430] ntpq dumps core (SIGSEGV) for "keytype md2"
+7298 -462
View File
File diff suppressed because it is too large. Load diff
+6 -6
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@
# 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
# 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 {} {} \; \
|| chmod -R a+r "$(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)
dist-bzip2: distdir
@@ -856,7 +856,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&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)
dist-zip: distdir
@@ -874,7 +874,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.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*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -884,7 +884,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
+125 -2
View File
@@ -1,8 +1,131 @@
---
NTP 4.2.8p13 (Harlan Stenn <[email protected]>, 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 <[email protected]>
- reported by Magnus Stubman
* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <[email protected]>
- applied patch by Ian Lepore
* [Bug 3558] Crash and integer size bug <[email protected]>
- isolate and fix linux/windows specific code issue
* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <[email protected]>
- provide better function for incremental string formatting
* [Bug 3555] Tidy up print alignment of debug output from ntpdate <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3554] config revoke stores incorrect value <[email protected]>
- original finding by Gerry Garvey, additional cleanup needed
* [Bug 3549] Spurious initgroups() error message <[email protected]>
- patch by Christous Zoulas
* [Bug 3548] Signature not verified on windows system <[email protected]>
- finding by Chen Jiabin, plus another one by me
* [Bug 3541] patch to fix STA_NANO struct timex units <[email protected]>
- applied patch by Maciej Szmigiero
* [Bug 3540] Cannot set minsane to 0 anymore <[email protected]>
- applied patch by Andre Charbonneau
* [Bug 3539] work_fork build fails when droproot is not supported <[email protected]>
- applied patch by Baruch Siach
* [Bug 3538] Build fails for no-MMU targets <[email protected]>
- applied patch by Baruch Siach
* [Bug 3535] libparse won't handle GPS week rollover <[email protected]>
- 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) <[email protected]>
- 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 <[email protected]>, reported by GGarvey.
- --enable-bug3527-fix support by HStenn
* [Bug 3526] Incorrect poll interval in packet <[email protected]>
- applied patch by Gerry Garvey
* [Bug 3471] Check for openssl/[ch]mac.h. <[email protected]>
- added missing check, reported by Reinhard Max <[email protected]>
* [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 <[email protected]>, 2018/14/09)
Focus: Security, Bug fixes, enhancements.
Severity: MEDIUM
This release fixes a "hole" in the noepeer capability introduced to ntpd
in ntp-4.2.8p11, and a buffer overflow in the openhost() function used by
ntpq and ntpdc. It also provides 26 other bugfixes, and 4 other improvements:
* [Sec 3505] Buffer overflow in the openhost() call of ntpq and ntpdc.
* [Sec 3012] Fix a hole in the new "noepeer" processing.
* Bug Fixes:
[Bug 3521] Fix a logic bug in the INVALIDNAK checks. <[email protected]>
[Bug 3509] Add support for running as non-root on FreeBSD, Darwin,
other TrustedBSD platforms
- applied patch by Ian Lepore <[email protected]>
[Bug 3506] Service Control Manager interacts poorly with NTPD <[email protected]>
- changed interaction with SCM to signal pending startup
[Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() <[email protected]>
- applied patch by Gerry Garvey
[Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <[email protected]>
- applied patch by Gerry Garvey
[Bug 3484] ntpq response from ntpd is incorrect when REFID is null <[email protected]>
- rework of ntpq 'nextvar()' key/value parsing
[Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) <[email protected]>
- applied patch by Gerry Garvey (with mods)
[Bug 3480] Refclock sample filter not cleared on clock STEP <[email protected]>
- applied patch by Gerry Garvey
[Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <[email protected]>
- applied patch by Gerry Garvey (with mods)
[Bug 3476]ctl_putstr() sends empty unquoted string [...] <[email protected]>
- applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though
[Bug 3475] modify prettydate() to suppress output of zero time <[email protected]>
- applied patch by Gerry Garvey
[Bug 3474] Missing pmode in mode7 peer info response <[email protected]>
- applied patch by Gerry Garvey
[Bug 3471] Check for openssl/[ch]mac.h. HStenn.
- add #define ENABLE_CMAC support in configure. HStenn.
[Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL <[email protected]>
[Bug 3469] Incomplete string compare [...] in is_refclk_addr <[email protected]>
- patch by Stephen Friedl
[Bug 3467] Potential memory fault in ntpq [...] <[email protected]>
- fixed IO redirection and CTRL-C handling in ntq and ntpdc
[Bug 3465] Default TTL values cannot be used <[email protected]>
[Bug 3461] refclock_shm.c: clear error status on clock recovery <[email protected]>
- initial patch by Hal Murray; also fixed refclock_report() trouble
[Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph. <[email protected]>
[Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
- According to Brooks Davis, there was only one location <[email protected]>
[Bug 3449] ntpq - display "loop" instead of refid [...] <[email protected]>
- applied patch by Gerry Garvey
[Bug 3445] Symmetric peer won't sync on startup <[email protected]>
- applied patch by Gerry Garvey
[Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey,
with modifications
New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c.
[Bug 3434] ntpd clears STA_UNSYNC on start <[email protected]>
- applied patch by Miroslav Lichvar
[Bug 3426] ntpdate.html -t default is 2 seconds. Leonid Evdokimov.
[Bug 3121] Drop root privileges for the forked DNS worker <[email protected]>
- integrated patch by Reinhard Max
[Bug 2821] minor build issues <[email protected]>
- applied patches by Christos Zoulas, including real bug fixes
html/authopt.html: cleanup, from <[email protected]>
ntpd/ntpd.c: DROPROOT cleanup. <[email protected]>
Symmetric key range is 1-65535. Update docs. <[email protected]>
--
NTP 4.2.8p11 (Harlan Stenn <[email protected]>, 2018/02/27)
NOTE: this NEWS file will be undergoing more revisions.
Focus: Security, Bug fixes, enhancements.
Severity: MEDIUM
+130 -135
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
# 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.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# serial 9 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
# longlong.m4 serial 17
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.
# 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.
dnl From Paul Eggert.
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
# Autoconf. Perhaps we can remove this once we can assume Autoconf
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
# Define HAVE_LONG_LONG_INT if '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.
# If autoconf reports a warning
# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
# 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.
# Note: If the type 'long long int' exists but is only 32 bits large
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
# defined. In this case you can treat 'long long int' like 'long int'.
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
# 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],
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
[
dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
dnl gnulib does not need it. But if it gets required by third-party macros
dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[ac_cv_type_long_long_int=yes
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
if test $ac_cv_type_long_long_int = yes; then
dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
dnl If cross compiling, assume the bug is not important, since
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
# gives unlimited permission to copy and/or distribute it,
@@ -154,7 +149,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
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.
m4_if([$1], [1.15], [],
m4_if([$1], [1.15.1], [],
[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.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
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_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_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
# gives unlimited permission to copy and/or distribute it,
@@ -237,7 +232,7 @@ AC_SUBST([AR])dnl
# 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
# gives unlimited permission to copy and/or distribute it,
@@ -289,7 +284,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# 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
# 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.]])
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
# 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 -*-
# 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
# 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 -*-
# 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
# gives unlimited permission to copy and/or distribute it,
@@ -784,7 +779,7 @@ for _am_header in $config_headers :; do
done
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
# gives unlimited permission to copy and/or distribute it,
@@ -805,7 +800,7 @@ if test x"${install_sh+set}" != xset; then
fi
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
# 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 -*-
# 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
# 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 -*-
# 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
# gives unlimited permission to copy and/or distribute it,
@@ -915,7 +910,7 @@ fi
# 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
# gives unlimited permission to copy and/or distribute it,
@@ -944,7 +939,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[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
# gives unlimited permission to copy and/or distribute it,
@@ -991,7 +986,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
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
# 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 -*-
# 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
# gives unlimited permission to copy and/or distribute it,
@@ -1091,7 +1086,7 @@ AC_CONFIG_COMMANDS_PRE(
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
# gives unlimited permission to copy and/or distribute it,
@@ -1151,7 +1146,7 @@ AC_SUBST([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
# gives unlimited permission to copy and/or distribute it,
@@ -1179,7 +1174,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
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
# 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 -*-
# 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
# gives unlimited permission to copy and/or distribute it,
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+1 -1
View File
@@ -52,7 +52,7 @@ esac
case "$NTP_BDIR" in
'')
case "$IAM" in
*.ntp.org)
*.ntp.org | *.ntfo.org)
NTP_BDIR=host
;;
*.udel.edu)
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+50 -27
View File
@@ -296,6 +296,9 @@
/* use old autokey session key behavior? */
#undef DISABLE_BUG1243_FIX
/* use old autokey session key behavior? */
#undef DISABLE_BUG3527_FIX
/* synch TODR hourly? */
#undef DOSYNCTODR
@@ -311,6 +314,9 @@
/* Provide the explicit 127.0.0.0/8 martian filter? */
#undef ENABLE_BUG3020_FIX
/* Enable CMAC support? */
#undef ENABLE_CMAC
/* nls support in libopts */
#undef ENABLE_NLS
@@ -372,6 +378,14 @@
/* Define to 1 if you have the `daemon' function. */
#undef HAVE_DAEMON
/* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you
don't. */
#undef HAVE_DECL_SIGLONGJMP
/* Define to 1 if you have the declaration of `sigsetjmp', and to 0 if you
don't. */
#undef HAVE_DECL_SIGSETJMP
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_R
@@ -539,7 +553,7 @@
/* Define to 1 if the system has the type `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
/* if you have SunOS LWP package */
@@ -653,6 +667,12 @@
/* if you have NT Threads */
#undef HAVE_NT_THREADS
/* Define to 1 if you have the <openssl/cmac.h> header file. */
#undef HAVE_OPENSSL_CMAC_H
/* Define to 1 if you have the <openssl/hmac.h> header file. */
#undef HAVE_OPENSSL_HMAC_H
/* Define to 1 if the system has the type `pid_t'. */
#undef HAVE_PID_T
@@ -957,6 +977,9 @@
/* Define to 1 if you have the <sys/lock.h> header file. */
#undef HAVE_SYS_LOCK_H
/* Define to 1 if you have the <sys/mac.h> header file. */
#undef HAVE_SYS_MAC_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
@@ -1117,6 +1140,9 @@
/* Do we have the TIO serial stuff? */
#undef HAVE_TIO_SERIAL_STUFF
/* Are TrustedBSD MAC policy privileges available? */
#undef HAVE_TRUSTEDBSD_MAC
/* Define to 1 if the system has the type `uint16_t'. */
#undef HAVE_UINT16_T
@@ -1147,7 +1173,7 @@
/* deviant 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
/* Define to 1 if you have the `updwtmp' function. */
@@ -1588,6 +1614,28 @@ typedef unsigned int uintptr_t;
/* OK to 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? */
#undef USE_TTY_SIGPOLL
@@ -1640,9 +1688,6 @@ typedef unsigned int uintptr_t;
/* enable thread safety */
#undef _THREAD_SAFE
/* Define to 500 only on HP-UX. */
#undef _XOPEN_SOURCE
/* Are we _special_? */
#undef __APPLE_USE_RFC_3542
@@ -1651,28 +1696,6 @@ typedef unsigned int uintptr_t;
# undef __CHAR_UNSIGNED__
#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 */
#undef adjtimex
+243 -56
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ntp 4.2.8p11.
# Generated by GNU Autoconf 2.69 for ntp 4.2.8p13.
#
# Report bugs to <http://bugs.ntp.org./>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ntp'
PACKAGE_TARNAME='ntp'
PACKAGE_VERSION='4.2.8p11'
PACKAGE_STRING='ntp 4.2.8p11'
PACKAGE_VERSION='4.2.8p13'
PACKAGE_STRING='ntp 4.2.8p13'
PACKAGE_BUGREPORT='http://bugs.ntp.org./'
PACKAGE_URL='http://www.ntp.org./'
@@ -968,6 +968,8 @@ enable_c99_snprintf
enable_clockctl
enable_linuxcaps
enable_solarisprivs
enable_trustedbsd_mac
enable_signalled_io
with_arlib
with_net_snmp_config
enable_libseccomp
@@ -1050,6 +1052,7 @@ enable_hourly_todr_sync
enable_kernel_fll_bug
enable_bug1243_fix
enable_bug3020_fix
enable_bug3527_fix
enable_irig_sawtooth
enable_nist
enable_ntp_signd
@@ -1614,7 +1617,7 @@ if test "$ac_init_help" = "long"; then
# 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.
cat <<_ACEOF
\`configure' configures ntp 4.2.8p11 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]...
@@ -1684,7 +1687,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ntp 4.2.8p11:";;
short | recursive ) echo "Configuration of ntp 4.2.8p13:";;
esac
cat <<\_ACEOF
@@ -1731,6 +1734,9 @@ Optional Features and Packages:
--enable-clockctl s Use /dev/clockctl for non-root clock control
--enable-linuxcaps + Use Linux capabilities 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
control
--enable-signalled-io s Use signalled IO if we can
--with-arlib - deprecated, arlib not distributed
--with-net-snmp-config + =net-snmp-config
--enable-libseccomp EXPERIMENTAL: enable support for libseccomp
@@ -1823,6 +1829,7 @@ Optional Features and Packages:
--enable-kernel-fll-bug s if we should avoid a kernel FLL bug
--enable-bug1243-fix + use unmodified autokey session keys
--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-nist - if we should enable the NIST lockclock scheme
--enable-ntp-signd - Provide support for Samba's signing daemon,
@@ -1923,7 +1930,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ntp configure 4.2.8p11
ntp configure 4.2.8p13
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2632,7 +2639,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ntp $as_me 4.2.8p11, which was
It was created by ntp $as_me 4.2.8p13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3633,7 +3640,7 @@ fi
# Define the identity of the package.
PACKAGE='ntp'
VERSION='4.2.8p11'
VERSION='4.2.8p13'
cat >>confdefs.h <<_ACEOF
@@ -5113,8 +5120,6 @@ done
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 :
MINIX=yes
@@ -5135,14 +5140,6 @@ $as_echo "#define _MINIX 1" >>confdefs.h
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_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
@@ -16090,18 +16087,18 @@ else
/* end confdefs.h. */
/* 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. */
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)];
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
? 1 : -1)];
int i = 63;
int
main ()
@@ -16110,9 +16107,9 @@ main ()
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));
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));
;
return 0;
}
@@ -16300,33 +16297,33 @@ if ${ac_cv_type_long_long_int+:} false; then :
else
ac_cv_type_long_long_int=yes
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
if test $ac_cv_type_long_long_int = yes; then
if test "$cross_compiling" = yes; then :
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
if test $ac_cv_type_long_long_int = yes; then
if test "$cross_compiling" = yes; then :
:
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <limits.h>
#ifndef LLONG_MAX
# define HALF \
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
# define LLONG_MAX (HALF - 1 + HALF)
#endif
#ifndef LLONG_MAX
# define HALF \
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
# define LLONG_MAX (HALF - 1 + HALF)
#endif
int
main ()
{
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;
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;
;
return 0;
}
@@ -16340,7 +16337,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
@@ -16363,18 +16360,18 @@ else
/* end confdefs.h. */
/* 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. */
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)];
? 1 : -1)];
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
? 1 : -1)];
? 1 : -1)];
int i = 63;
int
main ()
@@ -16383,9 +16380,9 @@ main ()
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));
| (llmax / ll) | (llmax % ll)
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
| (ullmax / ull) | (ullmax % ull));
;
return 0;
}
@@ -24021,12 +24018,51 @@ case "$ntp_have_solarisprivs" in
$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
;;
'') ntp_have_solarisprivs="no"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
$as_echo "$ntp_have_solarisprivs" >&6; }
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs" in
for ac_header in sys/mac.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_mac_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_MAC_H 1
_ACEOF
fi
done
# Check whether --enable-trustedbsd_mac was given.
if test "${enable_trustedbsd_mac+set}" = set; then :
enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; }
case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
yesyes)
$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
;;
*) ntp_use_trustedbsd_mac="no";
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
$as_echo "$ntp_use_trustedbsd_mac" >&6; }
case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
*yes*)
$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
@@ -24540,6 +24576,16 @@ fi
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_n "checking for SIGIO... " >&6; }
if ${ntp_cv_hdr_def_sigio+:} false; then :
@@ -24614,13 +24660,24 @@ case "$ntp_cv_hdr_def_sigio" in
ans=no
;;
esac
case "$ans" in
no)
ans="Possible for $host but disabled because of reported problems"
;;
esac
;;
esac
case "$ans" in
yes)
case "$use_signalled_io" in
yes)
$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
;;
*) ans="Allowed for $host but --disable-signalled-io was given"
;;
esac
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
@@ -28627,6 +28684,62 @@ case "$ntp_ok" in
$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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
@@ -30311,6 +30424,19 @@ $as_echo "$ntp_openssl" >&6; }
case "$ntp_openssl" in
yes)
for ac_header in openssl/cmac.h openssl/hmac.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
$as_echo "#define OPENSSL /**/" >>confdefs.h
@@ -30534,6 +30660,21 @@ LIBS="$NTPO_SAVED_LIBS"
{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
$as_echo_n "checking if we want to enable CMAC support... " >&6; }
case "$ac_cv_header_openssl_cmac_h" in
yes)
$as_echo "#define ENABLE_CMAC 1" >>confdefs.h
ans="yes"
;;
*) ans="no"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
$as_echo "$ans" >&6; }
@@ -31935,6 +32076,26 @@ $as_echo "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
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_n "checking if we should use the IRIG sawtooth filter... " >&6; }
@@ -33221,6 +33382,32 @@ fi
###
ac_fn_c_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
"
if test "x$ac_cv_have_decl_sigsetjmp" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SIGSETJMP $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include <setjmp.h>
"
if test "x$ac_cv_have_decl_siglongjmp" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SIGLONGJMP $ac_have_decl
_ACEOF
###
@@ -33964,7 +34151,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ntp $as_me 4.2.8p11, 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
CONFIG_FILES = $CONFIG_FILES
@@ -34031,7 +34218,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ntp config.status 4.2.8p11
ntp config.status 4.2.8p13
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
+34
View File
@@ -1749,6 +1749,7 @@ case "$ntp_ok" in
yes)
ntp_refclock=yes
AC_DEFINE([CLOCK_BANC], [1], [Datum/Bancomm bc635/VME interface?])
AC_SEARCH_LIBS([bcStartPci], [bcsdk], , , [])
;;
esac
AC_MSG_RESULT([$ntp_ok])
@@ -3014,6 +3015,17 @@ AC_MSG_RESULT([$ans])
NTP_OPENSSL
AC_MSG_CHECKING([if we want to enable CMAC support])
case "$ac_cv_header_openssl_cmac_h" in
yes)
AC_DEFINE([ENABLE_CMAC], [1], [Enable CMAC support?])
ans="yes"
;;
*) ans="no"
;;
esac
AC_MSG_RESULT([$ans])
NTP_CRYPTO_RAND
# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
@@ -4183,6 +4195,24 @@ case "$ans" in
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])
case "$host" in
@@ -4380,6 +4410,10 @@ NTP_PROBLEM_TESTS
###
AC_CHECK_DECLS([sigsetjmp,siglongjmp], [], [], [[#include <setjmp.h>]])
###
AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir],
[Default location of crypto key info])
+219 -87
View File
@@ -1,91 +1,223 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Authentication Support</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!--
<style1 {
color: #FF0000;
font-weight: bold;
}
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<h3>Authentication Support</h3>
<img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>Our resident cryptographer; now you see him, now you don't.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->5-Feb-2016 09:13<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#auth">Introduction</a></li>
<li class="inline"><a href="#symm">Symmetric Key Cryptography</a></li>
<li class="inline"><a href="#windows">Microsoft Windows Authentication</a></li>
<li class="inline"><a href="#pub">Public Key Cryptography</a></li>
</ul>
<hr>
<h4 id="auth">Introduction</h4>
<p>This page describes the various cryptographic authentication provisions in NTPv4. Authentication support allows the NTP client to verify that servers are in fact known and trusted and not intruders intending accidentally or intentionally to masquerade as a legitimate server. A detailed discussion of the NTP multi-layer security model and vulnerability analysis is in the white paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP Security Analysis</a>.</p>
<p> The NTPv3 specification (RFC-1305) defined an authentication scheme properly described as <em>symmetric key cryptography</em>. It used the Data Encryption Standard (DES) algorithm operating in cipher-block chaining (CBC) mode. Subsequently, this algorithm was replaced by the RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5. Either algorithm computes a message digest or one-way hash which can be used to verify the client has the same message digest as the server. The MD5 message digest algorithm is included in the distribution, so without further cryptographic support, the distribution can be freely exported.</p>
<p>If the OpenSSL cryptographic library is installed prior to building the distribution, all message digest algorithms included in the library may be used, including SHA and SHA1. However, if conformance to FIPS 140-2 is required, only a limited subset of these algorithms can be used. This library is available from <a href="http://www.openssl.org">http://www.openssl.org</a> and can be installed using the procedures outlined in the <a href="build.html">Building and Installing the Distribution</a> page. Once installed, the configure and build process automatically detects the library and links the library routines
required.</p>
<p>In addition to the symmetric key algorithms, this distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey Specification&quot;. This support is available only if the OpenSSL library has been installed and the <tt>--enable-autokey</tt> option is used when the distribution is built.</p>
<p> Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on private and public values which are generated by each participant and where the private value is never revealed. Autokey uses X.509 public certificates, which can be produced by commercial services, the OpenSSL application program, or the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in the NTP software distribution.</p>
<p>Note that according to US law, NTP binaries including OpenSSL library components, including the OpenSSL library itself, cannot be exported outside the US without license from the US Department of Commerce. Builders outside the US are advised to obtain the OpenSSL library directly from OpenSSL, which is outside the US, and build outside the US.</p>
<p>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> option of the <tt>server</tt> configuration command, as described in the <a href="confopt.html">Server Options</a> page. The <a href="keygen.html">ntp-keygen</a> page describes the files required for the various authentication schemes. Further details are in the briefings, papers and reports at the NTP project page linked from <a href="http://www.ntp.org">www.ntp.org</a>.</p>
<p>By default, the client sends non-authenticated packets and the server responds with non-authenticated packets. If the client sends authenticated packets, the server responds with authenticated packets if correct, or a crypto-NAK packet if not. In the case of unsolicited packets which might consume significant resources, such as broadcast or symmetric mode packets, authentication is required, unless overridden by a <tt>disable auth</tt> command. In the current climate of targeted broadcast or &quot;letterbomb&quot; attacks, defeating this requirement would be decidedly dangerous. In any case, the <tt>notrust </tt>flag, described on the <a href="authopt.html">Access Control Options</a> page, can be used to disable access to all but correctly authenticated clients.</p>
<h4 id="symm">Symmetric Key Cryptography</h4>
<p>The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,534 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.</p>
<p>The message digest is a cryptographic hash computed by an algorithm such as MD5, SHA, or AES-128 CMAC. When authentication is specified, a message authentication code (MAC) is appended to the NTP packet header. The MAC consists of a 32-bit key identifier (key ID) followed by a 128- or 160-bit message digest. The algorithm computes the digest as the hash of a 128- or 160- bit message digest key concatenated with the NTP packet header fields with the exception of the MAC. On transmit, the message digest is computed and inserted in the MAC. On receive, the message digest is computed and compared with the MAC. The packet is accepted only if the two MACs are identical. If a discrepancy is found by the client, the client ignores the packet, but raises an alarm. If this happens at the server, the server returns a special message called a <em>crypto-NAK</em>. Since the crypto-NAK is protected by the loopback test, an intruder cannot disrupt the protocol by sending a bogus crypto-NAK.</p>
<p>Keys and related information are specified in a keys file, which must be distributed and stored using secure means beyond the scope of the NTP protocol itself. Besides the keys used for ordinary NTP associations, additional keys can be used as passwords for the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs. Ordinarily, the <tt>ntp.keys</tt> file is generated by the <tt><a href="keygen.html">ntp-keygen</a></tt> program, but it can be constructed and edited using an ordinary text editor.</p>
<p> Each line of the keys file consists of three or four fields: a key ID in the range 1 to 65,534, inclusive, a key type, a message digest key consisting of a printable ASCII string less than 40 characters or a 40-character hex digit string, and an optional comma-separated list of IPs that are allowed to serve time. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.</p>
<table>
<caption style="caption-side: bottom;">
Figure 1. Typical Symmetric Key File
</caption>
<tr><td style="border: 1px solid black; border-spacing: 0;">
<pre style="color:grey;">
# ntpkey_MD5key_bk.ntp.org.3595864945
# Thu Dec 12 19:22:25 2013
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Authentication Support</title>
<!-- Changed by: Harlan Stenn, 24-Jul-2018 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
<!--
<style1 {
color: #FF0000;
font-weight: bold;
}
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<h3>Authentication Support</h3>
<img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>Our resident cryptographer; now you see him, now you don't.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->24-Jul-2018 09:12<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#auth">Introduction</a></li>
<li class="inline"><a href="#symm">Symmetric Key Cryptography</a></li>
<li class="inline"><a href="#windows">Microsoft Windows Authentication</a></li>
<li class="inline"><a href="#pub">Public Key Cryptography</a></li>
</ul>
<hr>
<h4 id="auth">Introduction</h4>
<p>This page describes the various cryptographic authentication
provisions in NTPv4. Authentication support allows the NTP client to
verify that servers are in fact known and trusted and not intruders
intending accidentally or intentionally to masquerade as a legitimate
server. A detailed discussion of the NTP multi-layer security model
and vulnerability analysis is in the white
paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP
Security Analysis</a>.</p>
<p>The NTPv3 specification (RFC-1305) defined an authentication scheme
properly described as <em>symmetric key cryptography</em>. It used
the Data Encryption Standard (DES) algorithm operating in cipher-block
chaining (CBC) mode. Subsequently, this algorithm was replaced by the
RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5.
Either algorithm computes a message digest or one-way hash which can
be used to verify the client has the same message digest as the
server. The MD5 message digest algorithm is included in the
distribution, so without further cryptographic support, the
distribution can be freely exported.</p>
<p>If the OpenSSL cryptographic library is installed prior to building
the distribution, all message digest algorithms included in the
library may be used, including SHA and SHA1. However, if conformance
to FIPS 140-2 is required, only a limited subset of these algorithms
can be used. This library is available
from <a href="http://www.openssl.org">http://www.openssl.org</a> and
can be installed using the procedures outlined in
the <a href="build.html">Building and Installing the Distribution</a>
page. Once installed, the configure and build process automatically
detects the library and links the library routines required.</p>
<p>In addition to the symmetric key algorithms, this distribution
includes support for the Autokey public key algorithms and protocol
specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey
Specification&quot;. This support is available only if the OpenSSL
library has been installed and the <tt>--enable-autokey</tt> option is
used when the distribution is built.</p>
<p> Public key cryptography is generally considered more secure than
symmetric key cryptography, since the security is based on private and
public values which are generated by each participant and where the
private value is never revealed. Autokey uses X.509 public
certificates, which can be produced by commercial services, the
OpenSSL application program, or
the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in
the NTP software distribution.</p>
<p>Note that according to US law, NTP binaries including OpenSSL library
components, including the OpenSSL library itself, cannot be exported
outside the US without license from the US Department of Commerce.
Builders outside the US are advised to obtain the OpenSSL library
directly from OpenSSL, which is outside the US, and build outside the
US.</p>
<p>Authentication is configured separately for each association using
the <tt>key</tt> or <tt>autokey</tt> option of the <tt>server</tt>
configuration command, as described in
the <a href="confopt.html">Server Options</a> page.
The <a href="keygen.html">ntp-keygen</a> page describes the files
required for the various authentication schemes. Further details are
in the briefings, papers and reports at the NTP project page linked
from <a href="http://www.ntp.org">www.ntp.org</a>.</p>
<p>By default, the client sends non-authenticated packets and the server
responds with non-authenticated packets. If the client sends
authenticated packets, the server responds with authenticated packets
if correct, or a crypto-NAK packet if not. In the case of unsolicited
packets which might consume significant resources, such as broadcast
or symmetric mode packets, authentication is required, unless
overridden by a <tt>disable auth</tt> command. In the current climate
of targeted broadcast or &quot;letterbomb&quot; attacks, defeating
this requirement would be decidedly dangerous. In any case,
the <tt>notrust </tt>flag, described on
the <a href="authopt.html">Access Control Options</a> page, can be
used to disable access to all but correctly authenticated clients.</p>
<h4 id="symm">Symmetric Key Cryptography</h4>
<p>The original NTPv3 specification (RFC-1305), as well as the current
NTPv4 specification (RFC-5905), allows any one of possibly 65,535
message digest keys (excluding zero), each distinguished by a 32-bit
key ID, to authenticate an association. The servers and clients
involved must agree on the key ID, key type and key to authenticate
NTP packets.</p>
<p>The message digest is a cryptographic hash computed by an algorithm
such as MD5, SHA, or AES-128 CMAC. When authentication is specified,
a message authentication code (MAC) is appended to the NTP packet
header. The MAC consists of a 32-bit key identifier (key ID) followed
by a 128- or 160-bit message digest. The algorithm computes the
digest as the hash of a 128- or 160- bit message digest key
concatenated with the NTP packet header fields with the exception of
the MAC. On transmit, the message digest is computed and inserted in
the MAC. On receive, the message digest is computed and compared with
the MAC. The packet is accepted only if the two MACs are identical.
If a discrepancy is found by the client, the client ignores the
packet, but raises an alarm. If this happens at the server, the
server returns a special message called a <em>crypto-NAK</em>. Since
the crypto-NAK is protected by the loopback test, an intruder cannot
disrupt the protocol by sending a bogus crypto-NAK.</p>
<p>Keys and related information are specified in a keys file, which must
be distributed and stored using secure means beyond the scope of the
NTP protocol itself. Besides the keys used for ordinary NTP
associations, additional keys can be used as passwords for
the <tt><a href="ntpq.html">ntpq</a></tt>
and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.
Ordinarily, the <tt>ntp.keys</tt> file is generated by
the <tt><a href="keygen.html">ntp-keygen</a></tt> program, but it can
be constructed and edited using an ordinary text editor.</p>
<p> Each line of the keys file consists of three or four fields: a key
ID in the range 1 to 65,535, inclusive, a key type, a message digest
key consisting of a printable ASCII string less than 40 characters or
a 40-character hex digit string, and an optional comma-separated list
of IPs that are allowed to serve time. If the OpenSSL library is
installed, the key type can be any message digest algorithm supported
by the library. If the OpenSSL library is not installed, the only
permitted key type is MD5.</p>
<table>
<caption style="caption-side: bottom;">
Figure 1. Typical Symmetric Key File
</caption>
<tr><td style="border: 1px solid black; border-spacing: 0;">
<pre style="color:grey;">
# ntpkey_MD5key_bk.ntp.org.3595864945
# Thu Dec 12 19:22:25 2013
1 MD5 L";Nw&lt;`.I&lt;f4U0)247"i # MD5 key
2 MD5 &amp;&gt;l0%XXK9O'51VwV&lt;xq~ # MD5 key
3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
4 MD5 Yue:tL[+vR)M`n~bY,'? # MD5 key
5 MD5 B;fxlKgr/&amp;4ZTbL6=RxA # MD5 key
6 MD5 4eYwa`o}3i@@[email protected]!l # MD5 key
7 MD5 `A.([h+;wTQ|xfi%Sn_! # MD5 key
8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
10 MD5 2late4Me # MD5 key
11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
</pre></td></tr></table>
<p>Figure 1 shows a typical keys file used by the reference implementation when the OpenSSL library is installed. In this figure, for key IDs in he range 1-10, the key is interpreted as a printable ASCII string. For key IDs in the range 11-20, the key is a 40-character hex digit string. The key is truncated or zero-filled internally to either 128 or 160 bits, depending on the key type. The line can be edited later or new lines can be added to change any field. The key can be changed to a password, such as <tt>2late4Me</tt> for key ID 10. Note that two or more keys files can be combined in any order as long as the key IDs are distinct.</p>
<p>When <tt>ntpd</tt> is started, it reads the keys file specified by the <tt>keys</tt> command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trustedkey</tt> configuration command before use. This allows, for instance, the installation of possibly several batches of keys and then activating a key remotely using <tt>ntpq</tt> or <tt>ntpdc</tt>. The <tt>requestkey</tt> command selects the key ID used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key ID used as the password for the <tt>ntpq</tt> utility.</p>
<h4 id="windows">Microsoft Windows Authentication</h4>
<p>In addition to the above means, <tt>ntpd</tt> now supports Microsoft Windows MS-SNTP authentication using Active Directory services. This support was contributed by the Samba Team and is still in development. It is enabled using the <tt>mssntp</tt> flag of the <tt>restrict</tt> command described on the <a href="accopt.html#restrict">Access Control Options</a> page. <span class="style1">Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.</span></p>
<h4 id="pub">Public Key Cryptography</h4>
<p>See the <a href="autokey.html">Autokey Public-Key Authentication</a> page.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
1 MD5 L";Nw&lt;`.I&lt;f4U0)247"i # MD5 key
2 MD5 &amp;&gt;l0%XXK9O'51VwV&lt;xq~ # MD5 key
3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
4 MD5 Yue:tL[+vR)M`n~bY,'? # MD5 key
5 MD5 B;fxlKgr/&amp;4ZTbL6=RxA # MD5 key
6 MD5 4eYwa`o}3i@@[email protected]!l # MD5 key
7 MD5 `A.([h+;wTQ|xfi%Sn_! # MD5 key
8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
10 MD5 2late4Me # MD5 key
11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
21 MD5 sampo 10.1.2.3/24
</pre></td></tr></table>
<p>Figure 1 shows a typical symmetric keys file used by the reference
implementation when the OpenSSL library is installed. Each line of
the file contains three or four fields. The first field is an integer
between 1 and 65535, inclusive, representing the key identifier. The
second field is the digest algorithm, which in the absence of the
OpenSSL library must be <tt>MD5</tt>, which designates the MD5 message
digest algorithm. The third field is the key. The optional fourth
field is one or more comma-separated IPs. An IP may end with an
optional <tt>/subnetbits</tt> suffix, which limits the acceptance of
the key identifier to packets claiming to be from the described IP
space. In this example, for the key IDs in the range 1-10 the key is
interpreted as a printable ASCII string. For the key IDs in the range
11-20, the key is a 40-character hex digit string. In either case,
the key is truncated or zero-filled internally to either 128 or 160
bits, depending on the key type. The line can be edited later or new
lines can be added to change any field. The key can be changed to a
password, such as <tt>2late4Me</tt> for key ID 10. Note that two or
more keys files can be combined in any order as long as the key IDs
are distinct.</p>
<p>When <tt>ntpd</tt> is started, it reads the keys file specified by
the <tt>keys</tt> command and installs the keys in the key cache.
However, individual keys must be activated with
the <tt>trustedkey</tt> configuration command before use. This
allows, for instance, the installation of possibly several batches of
keys and then activating a key remotely using <tt>ntpq</tt>
or <tt>ntpdc</tt>. The <tt>requestkey</tt> command selects the key ID
used as the password for the <tt>ntpdc</tt> utility, while
the <tt>controlkey</tt> command selects the key ID used as the
password for the <tt>ntpq</tt> utility.</p>
<h4 id="windows">Microsoft Windows Authentication</h4>
<p>In addition to the above means, <tt>ntpd</tt> now supports Microsoft
Windows MS-SNTP authentication using Active Directory services. This
support was contributed by the Samba Team and is still in development.
It is enabled using the <tt>mssntp</tt> flag of the <tt>restrict</tt>
command described on the <a href="accopt.html#restrict">Access Control
Options</a> page. <span class="style1">Note: Potential users should
be aware that these services involve a TCP connection to another
process that could potentially block, denying services to other users.
Therefore, this flag should be used only for a dedicated server with
no clients other than MS-SNTP.</span></p>
<h4 id="pub">Public Key Cryptography</h4>
<p>See the <a href="autokey.html">Autokey Public-Key Authentication</a>
page.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>
+25 -24
View File
@@ -4,6 +4,7 @@
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Authentication Commands and Options</title>
<!-- Changed by: stenn, 25-May-2018 -->
<link href="scripts/style.css" type="text/css" rel="stylesheet">
<style type="text/css">
.style1 {
@@ -17,7 +18,7 @@
<img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>Our resident cryptographer; now you see him, now you don't.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->15-Oct-2011 01:00<!-- #EndDate -->
<!-- #BeginDate format:En2m -->24-Jul-2018 07:27<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -28,65 +29,65 @@
<p>Unless noted otherwise, further information about these commands is on the <a href="authentic.html">Authentication Support</a> page.</p>
<dl>
<dt id=automax><tt>automax [<i>logsec</i>]</tt></dt>
<dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds. Note that the size of the key list for each association depends on this interval and the current poll interval. The default interval is 12 (about 1.1 hr). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information.</dd>
<dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds. Note that the size of the key list for each association depends on this interval and the current poll interval. The default interval is 12 (about 1.1 hr). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information.</dd>
<dt id="controlkey"><tt>controlkey <i>keyid</i></tt></dt>
<dd>Specifies the key ID for the <a
href="ntpq.html"><tt>ntpq</tt></a> utility, which uses the
standard protocol defined in RFC-1305. The <tt><i>keyid</i></tt> argument is the key ID for a <a href="#trustedkey">trusted
key</a>, where the value can be in the range 1 to 65534,
standard protocol defined in RFC-1305. The <tt><i>keyid</i></tt> argument is the key ID for a <a href="#trustedkey">trusted
key</a>, where the value can be in the range 1 to 65535,
inclusive.</dd>
<dt id="crypto"><tt>crypto [digest</tt> <em><tt>digest</tt></em><tt>]</tt> <tt>[host <i>name</i>] [ident <i>name</i>] [pw <i>password</i>] [randfile <i>file</i>]</tt></dt>
<dt id="crypto"><tt>crypto [digest <i>digest</i>] [host <i>name</i>] [ident <i>name</i>] [pw <i>password</i>] [randfile <i>file</i>]</tt></dt>
<dd>This command activates the Autokey public key cryptography
and loads the required host keys and certificate. If one or more files
are unspecified, the default names are used. Unless
and loads the required host keys and certificate. If one or more files
are unspecified, the default names are used. Unless
the complete path and name of the file are specified, the location of a file
is relative to the keys directory specified in the <tt>keysdir</tt> configuration
command with default <tt>/usr/local/etc</tt>. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information. Following are the options.</dd>
command with default <tt>/usr/local/etc</tt>. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information. Following are the options.</dd>
<dd>
<dl>
<dt><tt>digest</tt> <em><tt>digest</tt></em></dt>
<dt><tt>digest</tt> <i>digest</i></dt>
<dd>&nbsp;</dd>
<dd>Specify the message digest algorithm, with default MD5. If the OpenSSL library
is installed, <tt><i>digest</i></tt> can be be any message digest algorithm supported
by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5,</tt> <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>. All
participants in an Autokey subnet must use the same algorithm. The Autokey message digest algorithm is separate and distinct from the symmetric
key message digest algorithm. Note: If compliance with FIPS 140-2 is required,
by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5,</tt> <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>. All
participants in an Autokey subnet must use the same algorithm. The Autokey message digest algorithm is separate and distinct from the symmetric
key message digest algorithm. Note: If compliance with FIPS 140-2 is required,
the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>.</dd>
<dt><tt>host <i>name</i></tt></dt>
<dd>Specify the cryptographic media names for the host, sign and certificate files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
<dd>Specify the cryptographic media names for the host, sign and certificate files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
<dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
<dt><tt>ident <i>group</i></tt></dt>
<dd>Specify the cryptographic media names for the identity scheme files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
<dd>Specify the cryptographic media names for the identity scheme files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
<dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
<dt><tt>pw <i>password</i></tt></dt>
<dd>Specifies the password to decrypt files previously encrypted by the <tt>ntp-keygen</tt> program with the <tt>-p</tt> option. If this option is not specified, the default password is the string returned by the Unix <tt>gethostname()</tt> routine. </dd>
<dd>Specifies the password to decrypt files previously encrypted by the <tt>ntp-keygen</tt> program with the <tt>-p</tt> option. If this option is not specified, the default password is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
<dt><tt>randfile <i>file</i></tt></dt>
<dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
<dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
</dl>
</dd>
<dt id="ident"><tt>ident <i>group</i></tt></dt>
<dd>Specifies the group name for ephemeral associations mobilized by broadcast and symmetric passive modes. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
<dd>Specifies the group name for ephemeral associations mobilized by broadcast and symmetric passive modes. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
<dt id="keys"><tt>keys <i>path</i></tt></dt>
<dd>Specifies the complete directory path for the key file containing the key IDs, key types and keys used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. The format of the keyfile is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>. This is the same operation as the <tt>-k</tt> command line option. Note that the directory path for Autokey cryptographic media is specified by the <tt>keysdir</tt> command.</dd>
<dd>Specifies the complete directory path for the key file containing the key IDs, key types and keys used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. The format of the keyfile is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>. This is the same operation as the <tt>-k</tt> command line option. Note that the directory path for Autokey cryptographic media is specified by the <tt>keysdir</tt> command.</dd>
<dt id="keysdir"><tt>keysdir <i>path</i></tt></dt>
<dd>Specifies the complete directory path for the Autokey cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>. Note that the path for the symmetric keys file is specified by the <tt>keys</tt> command.</dd>
<dd>Specifies the complete directory path for the Autokey cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>. Note that the path for the symmetric keys file is specified by the <tt>keys</tt> command.</dd>
<dt id="requestkey"><tt>requestkey <i>keyid</i></tt></dt>
<dd>Specifies the key ID for the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program, which
uses a proprietary protocol specific to this implementation of <tt>ntpd</tt>. The <tt><i>keyid</i></tt> argument is a key ID
uses a proprietary protocol specific to this implementation of <tt>ntpd</tt>. The <tt><i>keyid</i></tt> argument is a key ID
for a <a href="#trustedkey">trusted key</a>, in the range 1 to
65534, inclusive.</dd>
65535, inclusive.</dd>
<dt id="revoke"><tt>revoke [<i>logsec</i>]</tt></dt>
<dd>Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in seconds, with default 17 (36 hr). See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
<dt id="trustedkey"><tt>trustedkey [<i>keyid</i> | (<i>lowid</i> ... <i>highid</i>)] [...]</tt></dt>
<dd>Specifies the key ID(s) which are trusted for the purposes of
authenticating peers with symmetric key cryptography. Key IDs
used to authenticate <tt>ntpq</tt> and <tt>ntpdc</tt> operations
must be listed here and additionally be enabled with <a href="#controlkey">controlkey</a> and/or <a href="#requestkey">requestkey</a>. The authentication
must be listed here and additionally be enabled with <a href="#controlkey">controlkey</a> and/or <a href="#requestkey">requestkey</a>. The authentication
procedure for time transfer requires that both the local and
remote NTP servers employ the same key ID and secret for this
purpose, although different keys IDs may be used with different
servers. Ranges of trusted key IDs may be specified: <tt>trustedkey (1 ... 19) 1000 (100 ... 199)</tt> enables the
lowest 120 key IDs which start with the digit 1. The spaces
servers. Ranges of trusted key IDs may be specified: <tt>trustedkey (1 ... 19) 1000 (100 ... 199)</tt> enables the
lowest 120 key IDs which start with the digit 1. The spaces
surrounding the ellipsis are required when specifying a range.</dd>
</dl>
<hr>
+2 -2
View File
@@ -13,7 +13,7 @@
Walt Kelly</a>
<p>The chicken is getting configuration advice.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->10-Mar-2014 05:01<!-- #EndDate -->
<!-- #BeginDate format:En2m -->24-Jul-2018 07:27<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -67,7 +67,7 @@ Walt Kelly</a>
<dt><tt>ident</tt> <em><tt>group</tt></em></dt>
<dd>Specify the group name for the association. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
<dt><tt>key</tt> <i><tt>key</tt></i></dt>
<dd>Send and receive packets authenticated by the symmetric key scheme described in the <a href="authentic.html">Authentication Support</a> page. The <i><tt>key</tt></i> specifies the key identifier with values from 1 to 65534, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd> <dt><tt>minpoll <i>minpoll<br>
<dd>Send and receive packets authenticated by the symmetric key scheme described in the <a href="authentic.html">Authentication Support</a> page. The <i><tt>key</tt></i> specifies the key identifier with values from 1 to 65535, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd> <dt><tt>minpoll <i>minpoll<br>
</i></tt><tt>maxpoll <i>maxpoll</i></tt></dt>
<dd>These options specify the minimum and maximum poll intervals for NTP messages, in seconds as a power of two. The maximum poll interval defaults to 10 (1024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36 hr). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 3 (8 s). Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
<dt><tt>mode <i>option</i></tt></dt>
+2 -2
View File
@@ -11,7 +11,7 @@
<p><img src="pic/alice23.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a></p>
<p>Alice holds the key.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->11-Jan-2018 11:55<!-- #EndDate -->
<!-- #BeginDate format:En2m -->24-Jul-2018 07:27<!-- #EndDate -->
UTC</p>
<br clear="left">
<h4>Related Links</h4>
@@ -313,7 +313,7 @@
</pre></td></tr></table>
<p>Figure 1 shows a typical symmetric keys file used by the reference
implementation. Each line of the file contains three or four fields,
first an integer between 1 and 65534, inclusive, representing the key
first an integer between 1 and 65535, inclusive, representing the key
identifier used in the <tt>server</tt> and <tt>peer</tt> configuration
commands. Second is the key type for the message digest algorithm,
which in the absence of the OpenSSL library must be <tt>MD5</tt> to
+2 -2
View File
@@ -11,7 +11,7 @@
<img src="pic/rabbit.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>I told you it was eyeball and wristwatch.</p>
<p>Last update:
<!-- #BeginDate format:En2m -->9-Feb-2014 03:34<!-- #EndDate -->
<!-- #BeginDate format:En2m -->21-Jul-2018 04:09<!-- #EndDate -->
UTC</p>
<br clear="left">
<hr>
@@ -63,7 +63,7 @@ Protocol (SNTP) Client</a> page. After a suitable period of mourning, the <tt>n
<dt><tt>-s</tt></dt>
<dd>Divert logging output from the standard output (default) to the system <tt>syslog</tt> facility. This is designed primarily for convenience of <tt>cron</tt> scripts.</dd>
<dt><tt>-t <i>timeout</i></tt></dt>
<dd>Specify the maximum time waiting for a server response as the value <i>timeout</i>, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.</dd>
<dd>Specify the maximum time waiting for a server response as the value <i>timeout</i>, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 2 seconds, a value suitable for polling across a LAN.</dd>
<dt><tt>-u</tt></dt>
<dd>Direct <tt>ntpdate</tt> to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the <tt>-d</tt> option always uses unprivileged ports.
<dt><tt>-<i>v</i></tt></dt>
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+12
View File
@@ -610,6 +610,18 @@ struct pkt {
#define STRATUM_TO_PKT(s) ((u_char)(((s) == (STRATUM_UNSPEC)) ?\
(STRATUM_PKT_UNSPEC) : (s)))
/*
* A test to determine if the refid should be interpreted as text string.
* This is usually the case for a refclock, which has stratum 0 internally,
* which results in sys_stratum 1 if the refclock becomes system peer, or
* in case of a kiss-of-death (KoD) packet that has STRATUM_PKT_UNSPEC (==0)
* in the packet which is converted to STRATUM_UNSPEC when the packet
* is evaluated.
*/
#define REFID_ISTEXT(s) (((s) <= 1) || ((s) >= STRATUM_UNSPEC))
/*
* Event codes. Used for reporting errors/events to the control module
*/
+21 -3
View File
@@ -93,6 +93,7 @@ extern systime_func_ptr ntpcal_set_timefunc(systime_func_ptr);
#define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */
#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
* here, the compiler often can't tell this.
@@ -404,14 +405,21 @@ basedate_get_eracenter(void);
extern time_t
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
*/
/*
* Start day of NTP time as days past the imaginary date 12/1/1 BC.
* (This is the beginning of the Christian Era, or BCE.)
* Start day of NTP time as days past 0000-12-31 in the proleptic
* 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
@@ -420,15 +428,25 @@ basedate_get_erabase(void);
*/
#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).
*/
#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).
*/
#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
+6 -1
View File
@@ -7,8 +7,13 @@
#define NTP_MD5_H
#ifdef OPENSSL
# include "openssl/evp.h"
# include <openssl/evp.h>
# include "libssl_compat.h"
# ifdef HAVE_OPENSSL_CMAC_H
# include <openssl/cmac.h>
# define CMAC "AES128CMAC"
# define AES_128_KEY_SIZE 16
# endif /*HAVE_OPENSSL_CMAC_H*/
#else /* !OPENSSL follows */
/*
* Provide OpenSSL-alike MD5 API if we're not using OpenSSL
+3
View File
@@ -40,6 +40,9 @@ extern void setup_logfile (const char *);
extern void errno_to_str(int, char *, size_t);
#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
* minimize source differences in NTP.
+2 -2
View File
@@ -275,8 +275,8 @@ extern u_long orphwait; /* orphan wait time */
extern char *sys_hostname; /* host name */
extern char *sys_groupname; /* group name */
extern char *group_name; /* group name */
extern u_long sys_revoke; /* keys revoke timeout */
extern u_long sys_automax; /* session key timeout */
extern u_char sys_revoke; /* keys revoke timeout */
extern u_char sys_automax; /* session key timeout */
#endif /* AUTOKEY */
/* ntp_util.c */
-1
View File
@@ -108,7 +108,6 @@ extern unsigned int splclock (void);
* some constants useful for GPS time conversion
*/
#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 */
/*
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+1
View File
@@ -110,6 +110,7 @@ libntp_a_SRCS = \
vint64ops.c \
work_fork.c \
work_thread.c \
xsbprintf.c \
ymd2yd.c \
$(libisc_SRCS) \
$(NULL)
+8 -6
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@
# 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
# 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 \
statestr.c strdup.c strl_obsd.c syssignal.c timetoa.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/backtrace-emptytbl.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) \
strl_obsd.$(OBJEXT) syssignal.$(OBJEXT) timetoa.$(OBJEXT) \
timevalops.$(OBJEXT) uglydate.$(OBJEXT) vint64ops.$(OBJEXT) \
work_fork.$(OBJEXT) work_thread.$(OBJEXT) ymd2yd.$(OBJEXT) \
$(am__objects_3) $(am__objects_1)
work_fork.$(OBJEXT) work_thread.$(OBJEXT) xsbprintf.$(OBJEXT) \
ymd2yd.$(OBJEXT) $(am__objects_3) $(am__objects_1)
am_libntp_a_OBJECTS = systime.$(OBJEXT) $(am__objects_4)
libntp_a_OBJECTS = $(am_libntp_a_OBJECTS)
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 \
statestr.c strdup.c strl_obsd.c syssignal.c timetoa.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/backtrace-emptytbl.c \
$(srcdir)/../lib/isc/backtrace.c \
@@ -704,6 +704,7 @@ libntp_a_SRCS = \
vint64ops.c \
work_fork.c \
work_thread.c \
xsbprintf.c \
ymd2yd.c \
$(libisc_SRCS) \
$(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)/work_fork.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@
.c.o:
+7 -10
View File
@@ -12,12 +12,6 @@
#include "ntp_md5.h" /* provides OpenSSL digest API */
#include "isc/string.h"
#ifdef OPENSSL
# include "openssl/cmac.h"
# define CMAC "AES128CMAC"
# define AES_128_KEY_SIZE 16
#endif
typedef struct {
const void * buf;
size_t len;
@@ -28,7 +22,7 @@ typedef struct {
size_t len;
} rwbuffT;
#ifdef OPENSSL
#if defined(OPENSSL) && defined(ENABLE_CMAC)
static size_t
cmac_ctx_size(
CMAC_CTX * ctx)
@@ -42,7 +36,7 @@ cmac_ctx_size(
}
return mlen;
}
#endif /*OPENSSL*/
#endif /*OPENSSL && ENABLE_CMAC*/
static size_t
make_mac(
@@ -63,6 +57,7 @@ make_mac(
INIT_SSL();
/* Check if CMAC key type specific code required */
# ifdef ENABLE_CMAC
if (ktype == NID_cmac) {
CMAC_CTX * ctx = NULL;
void const * keyptr = key->buf;
@@ -100,7 +95,9 @@ make_mac(
if (ctx)
CMAC_CTX_cleanup(ctx);
}
else { /* generic MAC handling */
else
# endif /*ENABLE_CMAC*/
{ /* generic MAC handling */
EVP_MD_CTX * ctx = EVP_MD_CTX_new();
u_int uilen = 0;
@@ -153,7 +150,7 @@ make_mac(
if (ktype == NID_md5)
{
EVP_MD_CTX * ctx = EVP_MD_CTX_new();
uint uilen = 0;
u_int uilen = 0;
if (digest->len < 16) {
msyslog(LOG_ERR, "%s", "MAC encrypt: MAC md5 buf too small.");
+2
View File
@@ -221,12 +221,14 @@ authreadkeys(
log_maybe(NULL,
"authreadkeys: invalid type for key %d",
keyno);
# ifdef ENABLE_CMAC
} else if (NID_cmac != keytype &&
EVP_get_digestbynid(keytype) == NULL) {
log_maybe(NULL,
"authreadkeys: no algorithm for key %d",
keyno);
keytype = 0;
# endif /* ENABLE_CMAC */
}
#else /* !OPENSSL follows */
/*
+1 -1
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.
*/
u_int32
+39 -1
View File
@@ -1832,6 +1832,7 @@ isocal_date_to_ntp(
*/
static int32_t s_baseday = NTP_TO_UNIX_DAYS;
static int32_t s_gpsweek = 0;
int32_t
basedate_eval_buildstamp(void)
@@ -1873,7 +1874,7 @@ basedate_eval_string(
goto buildstamp;
}
rc = scanf(str, "%lu%n", &ned, &nc);
rc = sscanf(str, "%lu%n", &ned, &nc);
if (rc == 1 && (size_t)nc == sl) {
if (ned <= INT32_MAX)
return (int32_t)ned;
@@ -1901,6 +1902,7 @@ basedate_set_day(
struct calendar jd;
int32_t retv;
/* set NTP base date for NTP era unfolding */
if (day < NTP_TO_UNIX_DAYS) {
msyslog(LOG_WARNING,
"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);
msyslog(LOG_INFO, "basedate set to %04hu-%02hu-%02hu",
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;
}
@@ -1934,4 +1947,29 @@ basedate_get_erabase(void)
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-*- */
+5
View File
@@ -170,6 +170,11 @@ common_prettydate(
LIB_GETBUF(bp);
if (ts->l_ui == 0 && ts->l_uf == 0) {
strlcpy (bp, "(no time)", LIB_BUFLENGTH);
return (bp);
}
/* get & fix milliseconds */
ntps = ts->l_ui;
msec = ts->l_uf / 4294967; /* fract / (2 ** 32 / 1000) */
+17 -10
View File
@@ -13,16 +13,16 @@
#include <lib_strbuf.h>
#ifdef OPENSSL
# include "openssl/cmac.h"
# include "openssl/crypto.h"
# include "openssl/err.h"
# include "openssl/evp.h"
# include "openssl/opensslv.h"
# include <openssl/crypto.h>
# include <openssl/err.h>
# include <openssl/evp.h>
# include <openssl/opensslv.h>
# include "libssl_compat.h"
# define CMAC_LENGTH 16
# define CMAC "AES128CMAC"
# ifdef HAVE_OPENSSL_CMAC_H
# include <openssl/cmac.h>
# define CMAC_LENGTH 16
# define CMAC "AES128CMAC"
# endif /*HAVE_OPENSSL_CMAC_H*/
int ssl_init_done;
#if OPENSSL_VERSION_NUMBER < 0x10100000L
@@ -126,6 +126,7 @@ keytype_from_text(
key_type = OBJ_sn2nid(upcased);
# ifdef ENABLE_CMAC
if (!key_type && !strncmp(CMAC, upcased, strlen(CMAC) + 1)) {
key_type = NID_cmac;
@@ -134,6 +135,7 @@ keytype_from_text(
__FILE__, __LINE__, __func__, CMAC);
}
}
# endif /*ENABLE_CMAC*/
#else
key_type = 0;
@@ -153,6 +155,7 @@ keytype_from_text(
digest_len = (md) ? EVP_MD_size(md) : 0;
if (!md || digest_len <= 0) {
# ifdef ENABLE_CMAC
if (key_type == NID_cmac) {
digest_len = CMAC_LENGTH;
@@ -160,7 +163,9 @@ keytype_from_text(
fprintf(stderr, "%s:%d:%s():%s:len\n",
__FILE__, __LINE__, __func__, CMAC);
}
} else {
} else
# endif /*ENABLE_CMAC*/
{
fprintf(stderr,
"key type %s is not supported by OpenSSL\n",
keytype_name(key_type));
@@ -209,6 +214,7 @@ keytype_name(
INIT_SSL();
name = OBJ_nid2sn(nid);
# ifdef ENABLE_CMAC
if (NID_cmac == nid) {
name = CMAC;
@@ -217,6 +223,7 @@ keytype_name(
__FILE__, __LINE__, __func__, CMAC);
}
} else
# endif /*ENABLE_CMAC*/
if (NULL == name) {
name = unknown_type;
}
+5 -4
View File
@@ -138,12 +138,13 @@ set_ctrl_c_hook(
if (NULL == c_hook) {
handler = SIG_DFL;
ctrl_c_hook = NULL;
} else {
handler = &sigint_handler;
signal_no_reset(SIGINT, handler);
ctrl_c_hook = c_hook;
} else {
ctrl_c_hook = c_hook;
handler = &sigint_handler;
signal_no_reset(SIGINT, handler);
}
signal_no_reset(SIGINT, handler);
}
#else /* SYS_WINNT follows */
/*
+8
View File
@@ -89,6 +89,10 @@ netwrite(
}
#if defined(HAVE_DROPROOT)
extern int set_user_group_ids(void);
#endif
/* === functions === */
/*
* exit_worker()
@@ -592,6 +596,10 @@ fork_blocking_child(
init_logging("ntp_intres", 0, FALSE);
setup_logfile(NULL);
#ifdef HAVE_DROPROOT
(void) set_user_group_ids();
#endif
/*
* And now back to the portable code
*/
+15 -2
View File
@@ -56,6 +56,17 @@
# define THREAD_MAXSTACKSIZE THREAD_MINSTACKSIZE
#endif
/* need a good integer to store a pointer... */
#ifndef UINTPTR_T
# if defined(UINTPTR_MAX)
# define UINTPTR_T uintptr_t
# elif defined(UINT_PTR)
# define UINTPTR_T UINT_PTR
# else
# define UINTPTR_T size_t
# endif
#endif
#ifdef SYS_WINNT
@@ -66,7 +77,7 @@ static BOOL same_os_sema(const sem_ref obj, void * osobj);
#else
# define thread_exit(c) pthread_exit((void*)(size_t)(c))
# define thread_exit(c) pthread_exit((void*)(UINTPTR_T)(c))
# define tickle_sem sem_post
void * blocking_thread(void *);
static void block_thread_signals(sigset_t *);
@@ -374,7 +385,9 @@ send_blocking_resp_internal(
if (empty)
{
# ifdef WORK_PIPE
write(c->resp_write_pipe, "", 1);
if (1 != write(c->resp_write_pipe, "", 1))
msyslog(LOG_WARNING, "async resolver: %s",
"failed to notify main thread!");
# else
tickle_sem(c->responses_pending);
# endif
+75
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! */
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+5 -9
View File
@@ -265,9 +265,7 @@ cvt_trimtsip(
clock_time->flags = PARSEB_POWERUP;
return CVT_OK;
}
if (week < GPSWRAP) {
week += GPSWEEKS;
}
week = basedate_expand_gpsweek(week);
/* 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 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 */
if (t->t_weekleap < GPSWRAP)
t->t_weekleap = (u_short)(t->t_weekleap + GPSWEEKS);
t->t_weekleap = basedate_expand_gpsweek(
(u_short) getshort((unsigned char *)&mb(20))); /* week no 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 */
if (t->t_week < GPSWRAP)
t->t_week = (u_short)(t->t_weekleap + GPSWEEKS);
t->t_week = basedate_expand_gpsweek(
(u_short) getshort((unsigned char *)&mb(18))); /* current week no */
lbp = (unsigned char *)&mb(14); /* last update time */
if (fetch_ieee754(&lbp, IEEE_SINGLE, &t0t, trim_offsets) != IEEE_OK)
-5
View File
@@ -45,11 +45,6 @@ gpstolfp(
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_uf = 0;
}
+2 -2
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@
# 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
# gives unlimited permission to copy and/or distribute it,
+1 -1
View File
@@ -21,7 +21,7 @@ crypto digest md5 host myhostname ident wedent pw cryptopass randfile /.rnd
revoke 10
keysdir "/etc/ntp/keys"
keys "/etc/ntp.keys"
trustedkey 1 2 3 4 5 6 7 8 9 10 11 12 (14 ... 16) 18 (32768 ... 65534)
trustedkey 1 2 3 4 5 6 7 8 9 10 11 12 (14 ... 16) 18 (32768 ... 65535)
controlkey 12
requestkey 12
enable auth ntp monitor stats
+6 -6
View File
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
# It has been AutoGen-ed February 27, 2018 at 05:14:34 PM 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
# and the template file agtexi-file.tpl
@end ignore
@@ -284,7 +284,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
@kbd{key}
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
@item @code{minpoll} @kbd{minpoll}
@@ -543,7 +543,7 @@ and reports at the NTP project page linked from
@code{http://www.ntp.org/}.
@subsubsection Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32-bit key identifier, to
65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -827,7 +827,7 @@ The
@kbd{key}
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{sign} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
This command requires the OpenSSL library.
It activates public key
@@ -920,7 +920,7 @@ The
@kbd{key}
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
@item @code{revoke} @kbd{logsec}
Specifies the interval between re-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -947,7 +947,7 @@ servers.
The
@kbd{key}
arguments are 32-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
@end table
@subsubsection Error Codes
The following error codes are reported via the NTP control
+3 -3
View File
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
# It has been AutoGen-ed February 27, 2018 at 05:14:37 PM 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
# and the template file agtexi-file.tpl
@end ignore
@@ -29,7 +29,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
The key file uses the same comment conventions
@@ -42,7 +42,7 @@ Key entries use a fixed format of the form
where
@kbd{keyno}
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
@kbd{type}
is the message digest algorithm,
@kbd{key}
+4 -4
View File
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
# It has been AutoGen-ed February 27, 2018 at 05:14:39 PM 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
# and the template file agtexi-cmd.tpl
@end ignore
@@ -142,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
ntpd - NTP daemon program - Ver. 4.2.8p11
ntpd - NTP daemon program - Ver. 4.2.8p13
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
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
- may appear multiple times
-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
- may appear multiple times
-k Str keyfile path to symmetric keys
@@ -187,7 +187,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-s Str statsdir Statistics file location
-t Str trustedkey Trusted key number
- 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
Str var make ARG an ntp variable (RW)
- may appear multiple times
+8 -8
View File
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5man "27 Feb 2018" "4.2.8p11" "File Formats"
.TH ntp.conf 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM 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
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -326,7 +326,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
\f\*[I-Font]key\f[]
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.TP 7
@@ -611,7 +611,7 @@ and reports at the NTP project page linked from
\f[C]http://www.ntp.org/\f[].
.SS Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32-bit key identifier, to
65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -932,7 +932,7 @@ The
\f\*[I-Font]key\f[]
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
@@ -1038,7 +1038,7 @@ The
\f\*[I-Font]key\f[]
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
Specifies the interval between re-randomization of certain
@@ -1067,7 +1067,7 @@ servers.
The
\f\*[I-Font]key\f[]
arguments are 32-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
.PP
.SS Error Codes
The following error codes are reported via the NTP control
+7 -7
View File
@@ -1,9 +1,9 @@
.Dd February 27 2018
.Dd February 20 2019
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM 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
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -325,7 +325,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -583,7 +583,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric\-Key Cryptography
The original RFC\-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32\-bit key identifier, to
65,535 keys, each distinguished by a 32\-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -877,7 +877,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -981,7 +981,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re\-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1008,7 +1008,7 @@ servers.
The
.Ar key
arguments are 32\-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
+5 -5
View File
@@ -327,7 +327,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -585,7 +585,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32-bit key identifier, to
65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -879,7 +879,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -983,7 +983,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1010,7 +1010,7 @@ servers.
The
.Ar key
arguments are 32-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
File diff suppressed because it is too large. Load diff
+8 -8
View File
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntp.conf 5 "27 Feb 2018" "4.2.8p11" "File Formats"
.TH ntp.conf 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM 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
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -326,7 +326,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
\f\*[I-Font]key\f[]
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.TP 7
@@ -611,7 +611,7 @@ and reports at the NTP project page linked from
\f[C]http://www.ntp.org/\f[].
.SS Symmetric-Key Cryptography
The original RFC-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32-bit key identifier, to
65,535 keys, each distinguished by a 32-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -932,7 +932,7 @@ The
\f\*[I-Font]key\f[]
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
This command requires the OpenSSL library.
@@ -1038,7 +1038,7 @@ The
\f\*[I-Font]key\f[]
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
.TP 7
.NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
Specifies the interval between re-randomization of certain
@@ -1067,7 +1067,7 @@ servers.
The
\f\*[I-Font]key\f[]
arguments are 32-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
.PP
.SS Error Codes
The following error codes are reported via the NTP control
+7 -7
View File
@@ -1,9 +1,9 @@
.Dd February 27 2018
.Dd February 20 2019
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:42 PM 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
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -325,7 +325,7 @@ option.
All packets sent to and received from the server or peer are to
include authentication fields encrypted using the specified
.Ar key
identifier with values from 1 to 65534, inclusive.
identifier with values from 1 to 65535, inclusive.
The
default is to include no encryption field.
.It Cm minpoll Ar minpoll
@@ -583,7 +583,7 @@ and reports at the NTP project page linked from
.Li http://www.ntp.org/ .
.Ss Symmetric\-Key Cryptography
The original RFC\-1305 specification allows any one of possibly
65,534 keys, each distinguished by a 32\-bit key identifier, to
65,535 keys, each distinguished by a 32\-bit key identifier, to
authenticate an association.
The servers and clients involved must
agree on the key and key identifier to
@@ -877,7 +877,7 @@ The
.Ar key
argument is
the key identifier for a trusted key, where the value can be in the
range 1 to 65,534, inclusive.
range 1 to 65,535, inclusive.
.It Xo Ic crypto
.Op Cm cert Ar file
.Op Cm leap Ar file
@@ -981,7 +981,7 @@ The
.Ar key
argument is a key identifier
for the trusted key, where the value can be in the range 1 to
65,534, inclusive.
65,535, inclusive.
.It Ic revoke Ar logsec
Specifies the interval between re\-randomization of certain
cryptographic values used by the Autokey scheme, as a power of 2 in
@@ -1008,7 +1008,7 @@ servers.
The
.Ar key
arguments are 32\-bit unsigned
integers with values from 1 to 65,534.
integers with values from 1 to 65,535.
.El
.Ss Error Codes
The following error codes are reported via the NTP control
+4 -4
View File
@@ -1,8 +1,8 @@
.TH ntp.keys 5man "27 Feb 2018" "4.2.8p11" "File Formats"
.TH ntp.keys 5man "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM 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
.\" and the template file agman-file.tpl
.Sh NAME
@@ -54,7 +54,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.sp \n(Ppu
.ne 2
@@ -73,7 +73,7 @@ Key entries use a fixed format of the form
where
\f\*[I-Font]keyno\f[]
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
\f\*[I-Font]type\f[]
is the message digest algorithm,
\f\*[I-Font]key\f[]
+5 -5
View File
@@ -1,9 +1,9 @@
.Dd February 27 2018
.Dd February 20 2019
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM 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
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -37,7 +37,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -48,7 +48,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
+2 -2
View File
@@ -36,7 +36,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -47,7 +47,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
+169 -118
View File
@@ -1,103 +1,145 @@
<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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>NTP Symmetric Key</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="NTP Symmetric Key">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
<meta name="keywords" content="NTP Symmetric Key">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="#Top" rel="start" title="Top">
<link href="dir.html#Top" rel="up" title="(dir)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
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>
<body>
<h1 class="settitle">NTP Symmetric Key</h1>
<div class="node">
<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>
<body lang="en">
<h1 class="settitle" align="center">NTP Symmetric Key</h1>
<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>
<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's
<p>This document describes the symmetric key file for the NTP Project&rsquo;s
<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.8p11 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
<ul>
<a href="#Top">NTP's Symmetric Key File User Manual</a>
<div class="shortcontents">
<ul class="no-bullet">
<li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
</ul>
</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">
<p><hr>
<a name="ntp_002ekeys-Description"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
<br>
<table class="menu" border="0" cellspacing="0">
<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">
</td></tr>
<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">
</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>
<!-- node-name, next, previous, up -->
<h3 class="section">Description</h3>
<a name="Description"></a>
<h2 class="chapter">1 Description</h2>
<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>.
</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">
<p><hr>
<hr>
<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>
<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
"Authentication Support"
&quot;Authentication Support&quot;
section of the
<code>ntp.conf(5)</code>
page.
<p><code>ntpd(8)</code>
</p>
<p><code>ntpd(8)</code>
reads its keys from a file specified using the
<code>-k</code>
command line option or the
<code>keys</code>
statement in the configuration file.
statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
<p>The key file uses the same comment conventions
as the configuration file.
</p>
<p>The key file uses the same comment conventions
as the configuration file.
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>
</pre>
<p>where
<p>where
<kbd>keyno</kbd>
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
<kbd>type</kbd>
is the message digest algorithm,
<kbd>key</kbd>
@@ -106,111 +148,120 @@ is the key itself, and
is an optional comma-separated list of IPs
where the
<kbd>keyno</kbd>
should be trusted.
that are allowed to serve time.
should be trusted.
that are allowed to serve time.
Each IP in
<kbd>opt_IP_list</kbd>
may contain an optional
<code>/subnetbits</code>
specification which identifies the number of bits for
the desired subnet of trust.
the desired subnet of trust.
If
<kbd>opt_IP_list</kbd>
is empty,
any properly-authenticated message will be
accepted.
<p>The
</p>
<p>The
<kbd>key</kbd>
may be given in a format
controlled by the
<kbd>type</kbd>
field.
field.
The
<kbd>type</kbd>
<code>MD5</code>
is always supported.
is always supported.
If
<code>ntpd</code>
was built with the OpenSSL library
then any digest library supported by that library may be specified.
then any digest library supported by that library may be specified.
However, if compliance with FIPS 140-2 is required the
<kbd>type</kbd>
must be either
<code>SHA</code>
or
<code>SHA1</code>.
<p>What follows are some key types, and corresponding formats:
<dl>
<dt><code>MD5</code><dd>The key is 1 to 16 printable characters terminated by
</p>
<p>What follows are some key types, and corresponding formats:
</p>
<dl compact="compact">
<dt><code>MD5</code></dt>
<dd><p>The key is 1 to 16 printable characters terminated by
an EOL,
whitespace,
or
a
<code>#</code>
(which is the "start of comment" character).
<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,
which is truncated as necessary.
(which is the &quot;start of comment&quot; character).
</p>
</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.
</p></dd>
</dl>
<p>Note that the keys used by the
<p>Note that the keys used by the
<code>ntpq(8)</code>
and
<code>ntpdc(8)</code>
programs are checked against passwords
requested by the programs and entered by hand,
so it is generally appropriate to specify these keys in ASCII format.
<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.
</p>
<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.
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">
<li><a accesskey="1" href="#ntp_002ekeys-Files">ntp.keys Files</a>: Files
<li><a accesskey="2" href="#ntp_002ekeys-See-Also">ntp.keys See Also</a>: See Also
<li><a accesskey="3" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>: Notes
</ul>
<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>
<hr>
<a name="ntp_002ekeys-Files"></a>
<div class="header">
<p>
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>
<h4 class="subsection">ntp.keys Files</h4>
<dl>
<dt><span class="file">/etc/ntp.keys</span><dd>the default name of the configuration file
<a name="ntp_002ekeys-Files-1"></a>
<h4 class="subsection">1.1.1 ntp.keys Files</h4>
<dl compact="compact">
<dt><samp>/etc/ntp.keys</samp></dt>
<dd><p>the default name of the configuration file
</p></dd>
</dl>
<div class="node">
<p><hr>
<a name="ntp_002ekeys-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntp_002ekeys-Files">ntp.keys Files</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntp_002ekeys-Notes">ntp.keys Notes</a>
<br>
<hr>
<a name="ntp_002ekeys-See-Also"></a>
<div class="header">
<p>
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>
</div>
<h4 class="subsection">ntp.keys See Also</h4>
<a name="ntp_002ekeys-See-Also-1"></a>
<h4 class="subsection">1.1.2 ntp.keys See Also</h4>
<p><code>ntp.conf(5)</code>,
<code>ntpd(1ntpdmdoc)</code>,
<code>ntpdate(1ntpdatemdoc)</code>,
<code>ntpdc(1ntpdcmdoc)</code>,
<code>sntp(1sntpmdoc)</code>
<div class="node">
<p><hr>
<a name="ntp_002ekeys-Notes"></a>Previous:&nbsp;<a rel="previous" accesskey="p" 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>
</p><hr>
<div class="header">
<p>
&nbsp; </p>
</div>
<h4 class="subsection">ntp.keys Notes</h4>
<a name="ntp_002ekeys-Notes-1"></a>
<h4 class="subsection">1.1.3 ntp.keys Notes</h4>
<p>This document was derived from FreeBSD.
</p><hr>
</body></html>
</body>
</html>
+4 -4
View File
@@ -1,8 +1,8 @@
.TH ntp.keys 5 "27 Feb 2018" "4.2.8p11" "File Formats"
.TH ntp.keys 5 "20 Feb 2019" "4.2.8p13" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:26 PM 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
.\" and the template file agman-file.tpl
.Sh NAME
@@ -54,7 +54,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.sp \n(Ppu
.ne 2
@@ -73,7 +73,7 @@ Key entries use a fixed format of the form
where
\f\*[I-Font]keyno\f[]
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
\f\*[I-Font]type\f[]
is the message digest algorithm,
\f\*[I-Font]key\f[]
+5 -5
View File
@@ -1,9 +1,9 @@
.Dd February 27 2018
.Dd February 20 2019
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:46 PM 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
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -37,7 +37,7 @@ statement in the configuration file.
While key number 0 is fixed by the NTP standard
(as 56 zero bits)
and may not be changed,
one or more keys numbered between 1 and 65534
one or more keys numbered between 1 and 65535
may be arbitrarily set in the keys file.
.Pp
The key file uses the same comment conventions
@@ -48,7 +48,7 @@ Key entries use a fixed format of the form
.Pp
where
.Ar keyno
is a positive integer (between 1 and 65534),
is a positive integer (between 1 and 65535),
.Ar type
is the message digest algorithm,
.Ar key
+39 -23
View File
@@ -364,7 +364,7 @@ static u_int32 get_match(const char *, struct masks *);
static u_int32 get_logmask(const char *);
static int/*BOOL*/ is_refclk_addr(const address_node * addr);
static void appendstr(char *, size_t, char *);
static void appendstr(char *, size_t, const char *);
#ifndef SIM
@@ -382,14 +382,14 @@ static void fatal_error(const char *fmt, ...)
#endif
{
va_list va;
va_start(va, fmt);
mvsyslog(LOG_EMERG, fmt, va);
va_end(va);
_exit(1);
}
/* FUNCTIONS FOR INITIALIZATION
* ----------------------------
*/
@@ -742,7 +742,7 @@ dump_config_tree(
atrv->value.i);
}
break;
case T_Double:
fprintf(df, " %s %s",
keyword(atrv->attr),
@@ -938,7 +938,7 @@ dump_config_tree(
if (T_Source == flag_tok_fifo->i) {
s = "source";
break;
}
}
}
} else {
const char *ap = rest_node->addr->address;
@@ -1446,7 +1446,7 @@ create_unpeer_node(
/* accumulate with overflow retention */
u = (10 * u + *pch - '0') | (u & 0xFF000000u);
}
if (!*pch && u <= ASSOCID_MAX) {
my_node->assocID = (associd_t)u;
my_node->addr = NULL;
@@ -2065,8 +2065,12 @@ config_auth(
#ifdef AUTOKEY
/* crypto revoke command */
if (ptree->auth.revoke)
sys_revoke = 1UL << ptree->auth.revoke;
if (ptree->auth.revoke > 2 && ptree->auth.revoke < 32)
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 /* !SIM */
@@ -2112,6 +2116,10 @@ config_tos_clock(
break;
}
}
if (basedate_get_day() <= NTP_TO_UNIX_DAYS)
basedate_set_day(basedate_eval_buildstamp() - 11);
return ret;
}
@@ -2132,7 +2140,7 @@ config_tos(
* since three variables with interdependecies are involved. We
* just log an error but do not stop: This might be caused by
* remote config, and it might be fixed by remote config, too.
*/
*/
int l_maxclock = sys_maxclock;
int l_minclock = sys_minclock;
int l_minsane = sys_minsane;
@@ -2162,7 +2170,7 @@ config_tos(
tos->value.d = 0;
}
break;
case T_Ceiling:
val = tos->value.d;
if (val > STRATUM_UNSPEC - 1) {
@@ -2194,8 +2202,8 @@ config_tos(
case T_Minsane:
val = tos->value.d;
if ((int)tos->value.d < 1)
tos->value.d = 1;
if ((int)tos->value.d < 0)
tos->value.d = 0;
l_minsane = (int)tos->value.d;
break;
}
@@ -2207,7 +2215,7 @@ config_tos(
" - daemon will not operate properly!",
l_minsane, l_minclock, l_maxclock);
}
/* -*- phase two: forward the values to the protocol machinery */
tos = HEAD_PFIFO(ptree->orphan_cmds);
for (; tos != NULL; tos = tos->link) {
@@ -3383,6 +3391,10 @@ config_ttl(
size_t i = 0;
int_node *curr_ttl;
/* [Bug 3465] There is a built-in default for the TTLs. We must
* overwrite 'sys_ttlmax' if we change that preset, and leave it
* alone otherwise!
*/
curr_ttl = HEAD_PFIFO(ptree->ttl);
for (; curr_ttl != NULL; curr_ttl = curr_ttl->link) {
if (i < COUNTOF(sys_ttl))
@@ -3392,7 +3404,8 @@ config_ttl(
"ttl: Number of TTL entries exceeds %zu. Ignoring TTL %d...",
COUNTOF(sys_ttl), curr_ttl->i);
}
sys_ttlmax = (i) ? (i - 1) : 0;
if (0 != i) /* anything written back at all? */
sys_ttlmax = i - 1;
}
#endif /* !SIM */
@@ -3621,10 +3634,8 @@ config_fudge(
err_flag = 1;
msyslog(LOG_ERR,
"unrecognized fudge reference clock address %s, line ignored",
stoa(&addr_sock));
}
if (!ISREFCLOCKADR(&addr_sock)) {
addr_node->address);
} else if (!ISREFCLOCKADR(&addr_sock)) {
err_flag = 1;
msyslog(LOG_ERR,
"inappropriate address %s for the fudge command, line ignored",
@@ -3696,7 +3707,7 @@ config_fudge(
msyslog(LOG_ERR,
"Unexpected fudge flag %s (%d) for %s",
token_name(curr_opt->attr),
curr_opt->attr, stoa(&addr_sock));
curr_opt->attr, addr_node->address);
exit(curr_opt->attr ? curr_opt->attr : 1);
}
}
@@ -3810,7 +3821,12 @@ config_vars(
case T_Automax:
#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
break;
@@ -4565,7 +4581,7 @@ config_ntpd(
if (config_tos_clock(ptree))
clamp_systime();
}
config_nic_rules(ptree, input_from_files);
config_monitor(ptree);
config_auth(ptree);
@@ -4845,7 +4861,7 @@ is_refclk_addr(
const address_node * addr
)
{
return addr && addr->address && !strncmp(addr->address, "127.127.", 6);
return addr && addr->address && !strncmp(addr->address, "127.127.", 8);
}
static void
@@ -5463,7 +5479,7 @@ static void
appendstr(
char *string,
size_t s,
char *new
const char *new
)
{
if (*string != '\0') {
+76 -63
View File
@@ -916,7 +916,7 @@ is_safe_filename(const char * name)
u_int widx, bidx, mask;
if ( ! (name && *name))
return FALSE;
mask = 1u;
while (0 != (widx = (u_char)*name++)) {
bidx = (widx & 15) << 1;
@@ -955,7 +955,7 @@ save_config(
* level. On POSIX systems we could allow '\\' but such
* filenames are tricky to manipulate from a shell, so just
* reject both types of slashes on all platforms.
*/
*/
/* TALOS-CAN-0062: block directory traversal for VMS, too */
static const char * illegal_in_filename =
#if defined(VMS)
@@ -983,8 +983,8 @@ save_config(
# if defined(_O_TEXT) /* windows, again */
| _O_TEXT
#endif
;
;
char filespec[128];
char filename[128];
char fullpath[512];
@@ -1046,7 +1046,7 @@ save_config(
/* copy data directly as we exactly know the size */
memcpy(filespec, reqpt, reqlen);
filespec[reqlen] = '\0';
/*
* allow timestamping of the saved config filename with
* strftime() format such as:
@@ -1110,7 +1110,7 @@ save_config(
*/
prc = snprintf(fullpath, sizeof(fullpath), "%s%s",
saveconfigdir, filename);
if (prc < 0 || prc >= sizeof(fullpath)) {
if (prc < 0 || (size_t)prc >= sizeof(fullpath)) {
ctl_printf("saveconfig exceeded maximum path length (%u)",
(u_int)sizeof(fullpath));
ctl_flushpkt(0);
@@ -1127,8 +1127,8 @@ save_config(
fptr = fdopen(fd, "w");
if (NULL == fptr || -1 == dump_all_config_trees(fptr, 1)) {
ctl_printf("Unable to save configuration to file '%s': %m",
filename);
ctl_printf("Unable to save configuration to file '%s': %s",
filename, strerror(errno));
msyslog(LOG_ERR,
"saveconfig %s from %s failed", filename,
stoa(&rbufp->recv_srcadr));
@@ -1154,7 +1154,7 @@ save_config(
#else /* !SAVECONFIG follows */
ctl_printf("%s",
"saveconfig unavailable, configured with --disable-saveconfig");
#endif
#endif
ctl_flushpkt(0);
}
@@ -1506,11 +1506,11 @@ ctl_putdata_ex(
} else {
datanotbinflag = TRUE;
add_len = 3;
if (datasent) {
*datapt++ = ',';
datalinelen++;
/* sum up total length */
for (argi = 0, src_len = 0; argi < argc; ++argi)
src_len += argv[argi].len;
@@ -1539,14 +1539,14 @@ ctl_putdata_ex(
/* Not enough room in this one, flush it out. */
if (src_len < cur_len)
cur_len = src_len;
memcpy(datapt, src_ptr, cur_len);
datapt += cur_len;
datalinelen += cur_len;
src_ptr += cur_len;
src_len -= cur_len;
ctl_flushpkt(CTL_MORE);
cur_len = (size_t)(dataend - datapt);
}
@@ -1571,7 +1571,7 @@ ctl_putdata(
)
{
CtlMemBufT args[1];
args[0].buf = dp;
args[0].len = dlen;
ctl_putdata_ex(args, 1, bin);
@@ -1594,7 +1594,7 @@ ctl_putstr(
)
{
CtlMemBufT args[4];
args[0].buf = tag;
args[0].len = strlen(tag);
if (data && len) {
@@ -1606,7 +1606,9 @@ ctl_putstr(
args[3].len = 1;
ctl_putdata_ex(args, 4, FALSE);
} else {
ctl_putdata_ex(args, 1, FALSE);
args[1].buf = "=\"\"";
args[1].len = 3;
ctl_putdata_ex(args, 2, FALSE);
}
}
@@ -1628,17 +1630,17 @@ ctl_putunqstr(
)
{
CtlMemBufT args[3];
args[0].buf = tag;
args[0].len = strlen(tag);
args[1].buf = "=";
args[1].len = 1;
if (data && len) {
args[1].buf = "=";
args[1].len = 1;
args[2].buf = data;
args[2].len = len;
ctl_putdata_ex(args, 3, FALSE);
args[2].buf = data;
args[2].len = len;
ctl_putdata_ex(args, 3, FALSE);
} else {
ctl_putdata_ex(args, 1, FALSE);
ctl_putdata_ex(args, 2, FALSE);
}
}
@@ -1656,7 +1658,7 @@ ctl_putdblf(
{
char buffer[40];
int rc;
rc = snprintf(buffer, sizeof(buffer),
(use_f ? "%.*f" : "%.*g"),
precision, d);
@@ -1677,7 +1679,7 @@ ctl_putuint(
int rc;
rc = snprintf(buffer, sizeof(buffer), "%lu", uval);
INSIST(rc >= 0 && rc < sizeof(buffer));
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
}
@@ -1716,7 +1718,7 @@ ctl_putfs(
{
char buffer[16];
int rc;
time_t fstamp = (time_t)uval - JAN_1970;
struct tm *tm = gmtime(&fstamp);
@@ -1744,7 +1746,7 @@ ctl_puthex(
{
char buffer[24]; /* must fit 64bit int! */
int rc;
rc = snprintf(buffer, sizeof(buffer), "0x%lx", uval);
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
@@ -1762,9 +1764,9 @@ ctl_putint(
{
char buffer[24]; /*must fit 64bit int */
int rc;
rc = snprintf(buffer, sizeof(buffer), "%ld", ival);
INSIST(rc >= 0 && rc < sizeof(buffer));
INSIST(rc >= 0 && (size_t)rc < sizeof(buffer));
ctl_putunqstr(tag, buffer, rc);
}
@@ -1780,7 +1782,7 @@ ctl_putts(
{
char buffer[24];
int rc;
rc = snprintf(buffer, sizeof(buffer),
"0x%08lx.%08lx",
(u_long)ts->l_ui, (u_long)ts->l_uf);
@@ -1800,7 +1802,7 @@ ctl_putadr(
)
{
const char *cq;
if (NULL == addr)
cq = numtoa(addr32);
else
@@ -1827,7 +1829,9 @@ ctl_putrefid(
bytes.w = refid;
for (nc = 0; nc < sizeof(bytes.b) && bytes.b[nc]; ++nc)
if (!isprint(bytes.b[nc]))
if ( !isprint(bytes.b[nc])
|| isspace(bytes.b[nc])
|| bytes.b[nc] == ',' )
bytes.b[nc] = '.';
ctl_putunqstr(tag, (const char*)bytes.b, nc);
}
@@ -1874,11 +1878,11 @@ ctl_printf(
va_list va;
char fmtbuf[128];
int rc;
va_start(va, fmt);
rc = vsnprintf(fmtbuf, sizeof(fmtbuf), fmt, va);
va_end(va);
if (rc < 0 || rc >= sizeof(fmtbuf))
if (rc < 0 || (size_t)rc >= sizeof(fmtbuf))
strcpy(fmtbuf + sizeof(fmtbuf) - strlen(ellipsis) - 1,
ellipsis);
ctl_putdata(fmtbuf, strlen(fmtbuf), 0);
@@ -1906,11 +1910,13 @@ ctl_putsys(
static struct timex ntx;
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
1.0e-6; /* nsec to msec */
# else
1.0e-3; /* usec to msec */
to_ms_usec;
# endif
/*
@@ -1951,10 +1957,10 @@ ctl_putsys(
break;
case CS_REFID:
if (sys_stratum > 1 && sys_stratum < STRATUM_UNSPEC)
ctl_putadr(sys_var[varid].text, sys_refid, NULL);
else
if (REFID_ISTEXT(sys_stratum))
ctl_putrefid(sys_var[varid].text, sys_refid);
else
ctl_putadr(sys_var[varid].text, sys_refid, NULL);
break;
case CS_REFTIME:
@@ -2315,7 +2321,7 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, -1, to_ms * ntx.offset)
(sys_var[varid].text, 0, -1, to_ms_nusec * ntx.offset)
);
break;
@@ -2330,7 +2336,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
to_ms * ntx.maxerror)
to_ms_usec * ntx.maxerror)
);
break;
@@ -2338,7 +2344,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
to_ms * ntx.esterror)
to_ms_usec * ntx.esterror)
);
break;
@@ -2362,7 +2368,7 @@ ctl_putsys(
CTL_IF_KERNLOOP(
ctl_putdblf,
(sys_var[varid].text, 0, 6,
to_ms * ntx.precision)
to_ms_usec * ntx.precision)
);
break;
@@ -2390,7 +2396,7 @@ ctl_putsys(
case CS_K_PPS_JITTER:
CTL_IF_KERNPPS(
ctl_putdbl,
(sys_var[varid].text, to_ms * ntx.jitter)
(sys_var[varid].text, to_ms_nusec * ntx.jitter)
);
break;
@@ -2678,11 +2684,10 @@ ctl_putpeer(
break;
}
#endif
if (p->stratum > 1 && p->stratum < STRATUM_UNSPEC)
ctl_putadr(peer_var[id].text, p->refid,
NULL);
else
if (REFID_ISTEXT(p->stratum))
ctl_putrefid(peer_var[id].text, p->refid);
else
ctl_putadr(peer_var[id].text, p->refid, NULL);
break;
case CP_REFTIME:
@@ -3061,7 +3066,7 @@ ctl_getitem(
* packet; If it's EOV, it will never be NULL again until the
* variable is found and processed in a given 'var_list'. (That
* is, a result is returned that is neither NULL nor EOV).
*/
*/
static const struct ctl_var eol = { 0, EOV, NULL };
static char buf[128];
static u_long quiet_until;
@@ -3101,7 +3106,7 @@ ctl_getitem(
++plhead;
while (plhead != pltail && isspace((u_char)pltail[-1]))
--pltail;
/* check payload size, terminate packet on overflow */
plsize = (size_t)(pltail - plhead);
if (plsize >= sizeof(buf))
@@ -3126,7 +3131,7 @@ ctl_getitem(
* variable lists after an EoV was returned. (Such a behavior
* actually caused Bug 3008.)
*/
if (NULL == var_list)
return &eol;
@@ -3443,11 +3448,11 @@ write_variables(
* Look through the variables. Dump out at the first sign of
* trouble.
*/
while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
while ((v = ctl_getitem(sys_var, &valuep)) != NULL) {
ext_var = 0;
if (v->flags & EOV) {
if ((v = ctl_getitem(ext_sys_var, &valuep)) !=
0) {
v = ctl_getitem(ext_sys_var, &valuep);
if (v != NULL) {
if (v->flags & EOV) {
ctl_error(CERR_UNKNOWNVAR);
return;
@@ -3461,16 +3466,24 @@ write_variables(
ctl_error(CERR_PERMISSION);
return;
}
if (!ext_var && (*valuep == '\0' || !atoint(valuep,
&val))) {
/* [bug 3565] writing makes sense only if we *have* a
* value in the packet!
*/
if (valuep == NULL) {
ctl_error(CERR_BADFMT);
return;
}
if (!ext_var && (val & ~LEAP_NOTINSYNC) != 0) {
ctl_error(CERR_BADVALUE);
return;
if (!ext_var) {
if ( !(*valuep && atoint(valuep, &val))) {
ctl_error(CERR_BADFMT);
return;
}
if ((val & ~LEAP_NOTINSYNC) != 0) {
ctl_error(CERR_BADVALUE);
return;
}
}
if (ext_var) {
octets = strlen(v->text) + strlen(valuep) + 2;
vareqv = emalloc(octets);
@@ -3647,7 +3660,7 @@ static u_int32 derive_nonce(
/* [Bug 3457] set flags and don't kill them again */
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
EVP_DigestInit_ex(ctx, EVP_get_digestbynid(NID_md5), NULL);
# else
# else
EVP_DigestInit(ctx, EVP_get_digestbynid(NID_md5));
# endif
EVP_DigestUpdate(ctx, salt, sizeof(salt));
@@ -3944,7 +3957,7 @@ static void read_mru_list(
int restrict_mask
)
{
static const char nulltxt[1] = { '\0' };
static const char nulltxt[1] = { '\0' };
static const char nonce_text[] = "nonce";
static const char frags_text[] = "frags";
static const char limit_text[] = "limit";
@@ -3954,7 +3967,7 @@ static void read_mru_list(
static const char maxlstint_text[] = "maxlstint";
static const char laddr_text[] = "laddr";
static const char resaxx_fmt[] = "0x%hx";
u_int limit;
u_short frags;
u_short resall;
+4 -3
View File
@@ -353,8 +353,8 @@ make_keylist(
* included in the hash is zero if broadcast mode, the peer
* cookie if client mode or the host cookie if symmetric modes.
*/
mpoll = 1 << min(peer->ppoll, peer->hpoll);
lifetime = min(1U << sys_automax, NTP_MAXSESSION * mpoll);
mpoll = 1U << min(peer->ppoll, peer->hpoll);
lifetime = min((1UL << sys_automax), NTP_MAXSESSION * mpoll);
if (peer->hmode == MODE_BROADCAST)
cookie = 0;
else
@@ -1486,7 +1486,8 @@ crypto_verify(
return (XEVNT_LEN);
i = (vallen + 3) / 4;
siglen = ntohl(ep->pkt[i++]);
siglen = ntohl(ep->pkt[i]);
++i;
if ( siglen > MAX_VALLEN
|| len - VALUE_LEN < ((vallen + 3) / 4) * 4
|| len - VALUE_LEN - ((vallen + 3) / 4) * 4
+48 -7
View File
@@ -1612,6 +1612,34 @@ set_wildcard_reuse(
}
#endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */
static isc_boolean_t
check_flags(
sockaddr_u *psau,
const char *name,
u_int32 flags
)
{
#if defined(SIOCGIFAFLAG_IN)
struct ifreq ifr;
int fd;
if (psau->sa.sa_family != AF_INET)
return ISC_FALSE;
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return ISC_FALSE;
ZERO(ifr);
memcpy(&ifr.ifr_addr, &psau->sa, sizeof(ifr.ifr_addr));
strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
if (ioctl(fd, SIOCGIFAFLAG_IN, &ifr) < 0) {
close(fd);
return ISC_FALSE;
}
close(fd);
if ((ifr.ifr_addrflags & flags) != 0)
return ISC_TRUE;
#endif /* SIOCGIFAFLAG_IN */
return ISC_FALSE;
}
static isc_boolean_t
check_flags6(
@@ -1661,19 +1689,32 @@ is_valid(
const char *name
)
{
u_int32 flags6;
u_int32 flags;
flags6 = 0;
flags = 0;
switch (psau->sa.sa_family) {
case AF_INET:
#ifdef IN_IFF_DETACHED
flags |= IN_IFF_DETACHED;
#endif
#ifdef IN_IFF_TENTATIVE
flags |= IN_IFF_TENTATIVE;
#endif
return check_flags(psau, name, flags) ? ISC_FALSE : ISC_TRUE;
case AF_INET6:
#ifdef IN6_IFF_DEPARTED
flags6 |= IN6_IFF_DEPARTED;
flags |= IN6_IFF_DEPARTED;
#endif
#ifdef IN6_IFF_DETACHED
flags6 |= IN6_IFF_DETACHED;
flags |= IN6_IFF_DETACHED;
#endif
#ifdef IN6_IFF_TENTATIVE
flags6 |= IN6_IFF_TENTATIVE;
flags |= IN6_IFF_TENTATIVE;
#endif
return check_flags6(psau, name, flags6) ? ISC_FALSE : ISC_TRUE;
return check_flags6(psau, name, flags) ? ISC_FALSE : ISC_TRUE;
default:
return ISC_FALSE;
}
}
/*
@@ -3092,7 +3133,7 @@ sendpkt(
int cc;
int rc;
u_char cttl;
l_fp fp_zero = { 0, 0 };
l_fp fp_zero = { { 0 }, 0 };
ismcast = IS_MCAST(dest);
if (!ismcast)
+26 -18
View File
@@ -246,7 +246,11 @@ ntp_adjtime_error_handler(
)
{
char des[1024] = ""; /* Decoded Error Status */
char *dbp, *ebp;
dbp = des;
ebp = dbp + sizeof(des);
switch (ret) {
case -1:
switch (saved_errno) {
@@ -363,37 +367,37 @@ or, from ntp_adjtime():
/* error (see status word) */
if (ptimex->status & STA_UNSYNC)
snprintf(des, sizeof(des), "%s%sClock Unsynchronized",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sClock Unsynchronized",
(*des) ? "; " : "");
if (ptimex->status & STA_CLOCKERR)
snprintf(des, sizeof(des), "%s%sClock Error",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sClock Error",
(*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSFREQ)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but no PPS",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but no PPS",
(*des) ? "; " : "");
if (!(ptimex->status & STA_PPSSIGNAL)
&& ptimex->status & STA_PPSTIME)
snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but no PPS signal",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but no PPS signal",
(*des) ? "; " : "");
if ( ptimex->status & STA_PPSTIME
&& ptimex->status & STA_PPSJITTER)
snprintf(des, sizeof(des), "%s%sPPS Time Sync wanted but PPS Jitter exceeded",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sPPS Time Sync wanted but PPS Jitter exceeded",
(*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSWANDER)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but PPS Wander exceeded",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but PPS Wander exceeded",
(*des) ? "; " : "");
if ( ptimex->status & STA_PPSFREQ
&& ptimex->status & STA_PPSERROR)
snprintf(des, sizeof(des), "%s%sPPS Frequency Sync wanted but Calibration error detected",
des, (*des) ? "; " : "");
xsbprintf(&dbp, ebp, "%sPPS Frequency Sync wanted but Calibration error detected",
(*des) ? "; " : "");
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
@@ -1099,10 +1103,14 @@ start_kern_loop(void)
pll_control = TRUE;
ZERO(ntv);
ntv.modes = MOD_BITS;
ntv.status = STA_PLL;
ntv.maxerror = MAXDISPERSE;
ntv.esterror = MAXDISPERSE;
ntv.constant = sys_poll; /* why is it that here constant is unconditionally set to sys_poll, whereas elsewhere is is modified depending on nanosecond vs. microsecond kernel? */
ntv.status = STA_PLL | STA_UNSYNC;
ntv.maxerror = MAXDISPERSE * 1.0e6;
ntv.esterror = MAXDISPERSE * 1.0e6;
ntv.constant = sys_poll;
/* ^^^^^^^^ why is it that here constant is
* unconditionally set to sys_poll, whereas elsewhere is is
* modified depending on nanosecond vs. microsecond kernel?
*/
#ifdef SIGSYS
/*
* Use sigsetjmp() to save state and then call ntp_adjtime(); if
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -454,7 +454,7 @@ extern int yydebug;
union YYSTYPE
{
#line 51 "../../ntpd/ntp_parser.y" /* yacc.c:1909 */
#line 52 "ntp_parser.y" /* yacc.c:1909 */
char * String;
double Double;
+95 -58
View File
@@ -33,7 +33,7 @@
/*
* This macro defines the authentication state. If x is 1 authentication
* is required; othewise it is optional.
* is required; otherwise it is optional.
*/
#define AUTH(x, y) ((x) ? (y) == AUTH_OK \
: (y) == AUTH_OK || (y) == AUTH_NONE)
@@ -272,7 +272,7 @@ kiss_code_check(
}
/*
/*
* Check that NAK is valid
*/
nak_code
@@ -315,7 +315,7 @@ valid_NAK(
return INVALIDNAK;
}
/*
/*
* Make sure that the extra field in the packet is all zeros
*/
rpkt = &rbufp->recv_pkt;
@@ -324,10 +324,13 @@ valid_NAK(
return INVALIDNAK;
}
/*
* Only valid if peer uses a key
/*
* During the first few packets of the autokey dance there will
* not (yet) be a keyid, but in this case FLAG_SKEY is set.
* So the NAK is invalid if either there's no peer, or
* if the keyid is 0 and FLAG_SKEY is not set.
*/
if (!peer || !peer->keyid || !(peer->flags & FLAG_SKEY)) {
if (!peer || (!peer->keyid && !(peer->flags & FLAG_SKEY))) {
return INVALIDNAK;
}
@@ -371,15 +374,22 @@ transmit(
*/
hpoll = peer->hpoll;
/*
* If we haven't received anything (even if unsync) since last
* send, reset ppoll.
*/
if (peer->outdate > peer->timelastrec && !peer->reach)
peer->ppoll = peer->maxpoll;
/*
* In broadcast mode the poll interval is never changed from
* minpoll.
*/
if (peer->cast_flags & (MDF_BCAST | MDF_MCAST)) {
peer->outdate = current_time;
poll_update(peer, hpoll);
if (sys_leap != LEAP_NOTINSYNC)
peer_xmit(peer);
poll_update(peer, hpoll);
return;
}
@@ -398,6 +408,7 @@ transmit(
*/
if (peer->cast_flags & MDF_ACAST) {
peer->outdate = current_time;
poll_update(peer, hpoll);
if (peer->unreach > sys_beacon) {
peer->unreach = 0;
peer->ttl = 0;
@@ -409,7 +420,6 @@ transmit(
peer_xmit(peer);
}
peer->unreach++;
poll_update(peer, hpoll);
return;
}
@@ -427,11 +437,11 @@ transmit(
*/
if (peer->cast_flags & MDF_POOL) {
peer->outdate = current_time;
poll_update(peer, hpoll);
if ( (peer_associations <= 2 * sys_maxclock)
&& ( peer_associations < sys_maxclock
|| sys_survivors < sys_minclock))
pool_xmit(peer);
poll_update(peer, hpoll);
return;
}
@@ -539,9 +549,9 @@ transmit(
/*
* Do not transmit if in broadcast client mode.
*/
poll_update(peer, hpoll);
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
poll_update(peer, hpoll);
return;
}
@@ -645,7 +655,7 @@ receive(
hisleap = PKT_LEAP(pkt->li_vn_mode);
hismode = (int)PKT_MODE(pkt->li_vn_mode);
hisstratum = PKT_TO_STRATUM(pkt->stratum);
DPRINTF(2, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s restrict %s org %#010x.%08x xmt %#010x.%08x\n",
DPRINTF(1, ("receive: at %ld %s<-%s ippeerlimit %d mode %d iflags %s restrict %s org %#010x.%08x xmt %#010x.%08x\n",
current_time, stoa(&rbufp->dstadr->sin),
stoa(&rbufp->recv_srcadr), r4a.ippeerlimit, hismode,
build_iflags(rbufp->dstadr->flags),
@@ -737,7 +747,7 @@ receive(
} else {
DPRINTF(2, ("receive: drop: MODE_UNSPEC\n"));
sys_badlength++;
return; /* invalid mode */
return; /* invalid mode */
}
}
@@ -841,7 +851,7 @@ receive(
/*
** Packet Data Verification Layer
**
** This layer verifies the packet data content. If
** This layer verifies the packet data content. If
** authentication is required, a MAC must be present.
** If a MAC is present, it must validate.
** Crypto-NAK? Look - a shiny thing!
@@ -949,7 +959,7 @@ receive(
if (0 != peer) {
peer->badNAK++;
}
msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s",
msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s",
current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr));
return;
}
@@ -957,7 +967,7 @@ receive(
if (has_mac == 0) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_NONE; /* not required */
DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n",
DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x NOMAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
authlen,
@@ -966,7 +976,7 @@ receive(
} else if (crypto_nak_test == VALIDNAK) {
restrict_mask &= ~RES_MSSNTP;
is_authentic = AUTH_CRYPTO; /* crypto-NAK */
DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC4\n",
DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x CRYPTONAK\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -989,13 +999,19 @@ receive(
&& (memcmp(zero_key, (char *)pkt + authlen + 4,
MAX_MD5_LEN - 4) == 0)) {
is_authentic = AUTH_NONE;
DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s len %d org %#010x.%08x xmt %#010x.%08x SIGND\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
authlen,
ntohl(pkt->org.l_ui), ntohl(pkt->org.l_uf),
ntohl(pkt->xmt.l_ui), ntohl(pkt->xmt.l_uf)));
#endif /* HAVE_NTP_SIGND */
} else {
/*
* has_mac is not 0
* Not a VALID_NAK
* Not an MS-SNTP SIGND packet
* Not an MS-SNTP SIGND packet
*
* So there is a MAC here.
*/
@@ -1054,7 +1070,7 @@ receive(
ANY_INTERFACE_CHOOSE(&rbufp->recv_srcadr)) {
DPRINTF(2, ("receive: drop: BCAST from wildcard\n"));
sys_restricted++;
return; /* no wildcard */
return; /* no wildcard */
}
pkeyid = 0;
if (!SOCK_UNSPEC(&rbufp->dstadr->bcast))
@@ -1106,7 +1122,7 @@ receive(
if (crypto_flags && skeyid > NTP_MAXKEY)
authtrust(skeyid, 0);
#endif /* AUTOKEY */
DPRINTF(2, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x\n",
DPRINTF(1, ("receive: at %ld %s<-%s mode %d/%s:%s keyid %08x len %d auth %d org %#010x.%08x xmt %#010x.%08x MAC\n",
current_time, stoa(dstadr_sin),
stoa(&rbufp->recv_srcadr), hismode, hm_str, am_str,
skeyid, authlen + has_mac, is_authentic,
@@ -1198,6 +1214,8 @@ receive(
* client association; a symmetric active packet mobilizes a
* symmetric passive association.
*/
DPRINTF(1, ("receive: MATCH_ASSOC dispatch: mode %d/%s:%s \n",
hismode, hm_str, am_str));
switch (retcode) {
/*
@@ -1373,7 +1391,7 @@ receive(
if (NULL == peer) {
DPRINTF(2, ("receive: AM_MANYCAST drop: duplicate\n"));
sys_declined++;
return; /* ignore duplicate */
return; /* ignore duplicate */
}
/*
@@ -1511,10 +1529,10 @@ receive(
* is fixed at this value.
*/
peer = newpeer(&rbufp->recv_srcadr, NULL, match_ep,
r4a.ippeerlimit, MODE_CLIENT, hisversion,
pkt->ppoll, pkt->ppoll,
FLAG_BC_VOL | FLAG_IBURST | FLAG_PREEMPT, MDF_BCLNT,
0, skeyid, sys_ident);
r4a.ippeerlimit, MODE_CLIENT, hisversion,
pkt->ppoll, pkt->ppoll,
FLAG_BC_VOL | FLAG_IBURST | FLAG_PREEMPT, MDF_BCLNT,
0, skeyid, sys_ident);
if (NULL == peer) {
DPRINTF(2, ("receive: AM_NEWBCL drop: empty newpeer() failed\n"));
sys_restricted++;
@@ -1529,15 +1547,19 @@ receive(
return; /* hooray */
/*
* This is the first packet received from a symmetric active
* peer. If the packet is authentic, the first he sent, and
* RES_NOEPEER is not enabled, mobilize a passive association
* If not, kiss the frog.
* This is the first packet received from a potential ephemeral
* symmetric active peer. First, deal with broken Windows clients.
* Then, if NOEPEER is enabled, drop it. If the packet meets our
* authenticty requirements and is the first he sent, mobilize
* a passive association.
* Otherwise, kiss the frog.
*
* There are cases here where we do not call record_raw_stats().
*/
case AM_NEWPASS:
DEBUG_REQUIRE(MODE_ACTIVE == hismode);
#ifdef AUTOKEY
/*
* Do not respond if not the same group.
@@ -1551,27 +1573,33 @@ receive(
if (!AUTH(sys_authenticate | (restrict_mask &
(RES_NOPEER | RES_DONTTRUST)), is_authentic)
) {
if (0 == (restrict_mask & RES_NOEPEER)) {
/*
* If authenticated but cannot mobilize an
* association, send a symmetric passive
* response without mobilizing an association.
* This is for drat broken Windows clients. See
* Microsoft KB 875424 for preferred workaround.
*/
if (AUTH(restrict_mask & RES_DONTTRUST,
is_authentic)) {
fast_xmit(rbufp, MODE_PASSIVE, skeyid,
restrict_mask);
return; /* hooray */
}
if (is_authentic == AUTH_ERROR) {
fast_xmit(rbufp, MODE_ACTIVE, 0,
restrict_mask);
sys_restricted++;
return;
}
/*
* If authenticated but cannot mobilize an
* association, send a symmetric passive
* response without mobilizing an association.
* This is for drat broken Windows clients. See
* Microsoft KB 875424 for preferred workaround.
*/
if (AUTH(restrict_mask & RES_DONTTRUST,
is_authentic)) {
fast_xmit(rbufp, MODE_PASSIVE, skeyid,
restrict_mask);
return; /* hooray */
}
/* HMS: Why is this next set of lines a feature? */
if (is_authentic == AUTH_ERROR) {
fast_xmit(rbufp, MODE_PASSIVE, 0,
restrict_mask);
sys_restricted++;
return;
}
if (restrict_mask & RES_NOEPEER) {
DPRINTF(2, ("receive: AM_NEWPASS drop: NOEPEER\n"));
sys_declined++;
return;
}
/* [Bug 2941]
* If we got here, the packet isn't part of an
* existing association, either isn't correctly
@@ -1593,6 +1621,12 @@ receive(
return;
}
if (restrict_mask & RES_NOEPEER) {
DPRINTF(2, ("receive: AM_NEWPASS drop: NOEPEER\n"));
sys_declined++;
return;
}
/*
* Do not respond if synchronized and if stratum is
* below the floor or at or above the ceiling. Note,
@@ -1670,8 +1704,8 @@ receive(
}
/* This is error-worthy */
if (pkt->ppoll < peer->minpoll ||
pkt->ppoll > peer->maxpoll ) {
if ( pkt->ppoll < peer->minpoll
|| pkt->ppoll > peer->maxpoll) {
msyslog(LOG_INFO, "receive: broadcast poll of %u from %s is out-of-range (%d to %d)!",
pkt->ppoll, stoa(&rbufp->recv_srcadr),
peer->minpoll, peer->maxpoll);
@@ -1719,7 +1753,7 @@ receive(
* network is trustable, so we take our accepted
* broadcast packets as we receive them. But
* some folks might want to take additional poll
* delays before believing a backward step.
* delays before believing a backward step.
*/
if (sys_bcpollbstep) {
/* pkt->ppoll or peer->ppoll ? */
@@ -1735,8 +1769,8 @@ receive(
tdiff = p_xmt;
L_SUB(&tdiff, &peer->bxmt);
}
if (tdiff.l_i < 0 &&
(current_time - peer->timereceived) < deadband)
if ( tdiff.l_i < 0
&& (current_time - peer->timereceived) < deadband)
{
msyslog(LOG_INFO, "receive: broadcast packet from %s contains non-monotonic timestamp: %#010x.%08x -> %#010x.%08x",
stoa(&rbufp->recv_srcadr),
@@ -2431,6 +2465,7 @@ process_packet(
peer->seldisptoolarge++;
DPRINTF(1, ("packet: flash header %04x\n",
peer->flash));
poll_update(peer, peer->hpoll); /* ppoll updated? */
return;
}
@@ -2586,7 +2621,7 @@ process_packet(
* between the unicast timestamp and the broadcast
* timestamp. This works for both basic and interleaved
* modes.
* [Bug 3031] Don't keep this peer when the delay
* [Bug 3031] Don't keep this peer when the delay
* calculation gives reason to suspect clock steps.
* This is assumed for delays > 50ms.
*/
@@ -2977,8 +3012,6 @@ poll_update(
} else {
if (peer->retry > 0)
hpoll = peer->minpoll;
else if (!(peer->reach))
hpoll = peer->hpoll;
else
hpoll = min(peer->ppoll, peer->hpoll);
#ifdef REFCLOCK
@@ -3072,6 +3105,10 @@ peer_clear(
peer->stratum = STRATUM_UNSPEC;
memcpy(&peer->refid, ident, 4);
#ifdef REFCLOCK
} else {
/* Clear refclock sample filter */
peer->procptr->codeproc = 0;
peer->procptr->coderecv = 0;
}
#endif
@@ -3987,7 +4024,7 @@ peer_xmit(
DPRINTF(1, ("peer_xmit: at %ld %s->%s mode %d len %zu xmt %#010x.%08x\n",
current_time,
peer->dstadr ? stoa(&peer->dstadr->sin) : "-",
stoa(&peer->srcadr), peer->hmode, sendlen,
stoa(&peer->srcadr), peer->hmode, sendlen,
xmt_tx.l_ui, xmt_tx.l_uf));
return;
}
@@ -4330,7 +4367,7 @@ leap_smear_add_offs(
return;
}
#endif /* LEAP_SMEAR */
#endif /* LEAP_SMEAR */
/*
+1 -1
View File
@@ -112,7 +112,7 @@ refclock_report(
/* ignore others */
break;
}
if (pp->lastevent < 15)
if ((code != CEVNT_NOMINAL) && (pp->lastevent < 15))
pp->lastevent++;
if (pp->currentstatus != code) {
pp->currentstatus = (u_char)code;
+9
View File
@@ -890,6 +890,7 @@ peer_info (
ip->flags |= INFO_FLAG_SHORTLIST;
ip->leap = pp->leap;
ip->hmode = pp->hmode;
ip->pmode = pp->pmode;
ip->keyid = pp->keyid;
ip->stratum = pp->stratum;
ip->ppoll = pp->ppoll;
@@ -2535,7 +2536,15 @@ get_clock_info(
DTOLFP(clock_stat.fudgetime2, &ltmp);
HTONL_FP(&ltmp, &ic->fudgetime2);
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);
#else
ic->fudgeval2 = clock_stat.fudgeval2;
#endif
free_varlist(clock_stat.kv_list);
+4 -4
View File
@@ -82,8 +82,8 @@ u_long orphwait; /* orphan wait time */
#ifdef AUTOKEY
static u_long revoke_timer; /* keys revoke timer */
static u_long keys_timer; /* session key timer */
u_long sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
u_long sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
u_char sys_revoke = KEY_REVOKE; /* keys revoke timeout (log2 s) */
u_char sys_automax = NTP_AUTOMAX; /* key list timeout (log2 s) */
#endif /* AUTOKEY */
/*
@@ -404,7 +404,7 @@ timer(void)
* Garbage collect expired keys.
*/
if (keys_timer <= current_time) {
keys_timer += 1 << sys_automax;
keys_timer += (1UL << sys_automax);
auth_agekeys();
}
@@ -413,7 +413,7 @@ timer(void)
* to regenerate cookies.
*/
if (revoke_timer && revoke_timer <= current_time) {
revoke_timer += 1 << sys_revoke;
revoke_timer += (1UL << sys_revoke);
RAND_bytes((u_char *)&sys_private, 4);
}
#endif /* AUTOKEY */
+8 -8
View File
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
* It has been AutoGen-ed February 27, 2018 at 05:13:19 PM 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
* 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
* 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 char const ntpd_opt_strs[3132] =
/* 0 */ "ntpd 4.2.8p11\n"
/* 0 */ "ntpd 4.2.8p13\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"
"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"
/* 2937 */ "version\0"
/* 2945 */ "NTPD\0"
/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p11\n"
/* 2950 */ "ntpd - NTP daemon program - Ver. 4.2.8p13\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3082 */ "http://bugs.ntp.org, [email protected]\0"
/* 3116 */ "\n\0"
/* 3118 */ "ntpd 4.2.8p11";
/* 3118 */ "ntpd 4.2.8p13";
/**
* ipv4 option description with
@@ -1529,7 +1529,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
puts(_("ntpd 4.2.8p11\n\
puts(_("ntpd 4.2.8p13\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\
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"));
/* referenced via ntpdOptions.pzUsageTitle */
puts(_("ntpd - NTP daemon program - Ver. 4.2.8p11\n\
puts(_("ntpd - NTP daemon program - Ver. 4.2.8p13\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1678,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
puts(_("ntpd 4.2.8p11"));
puts(_("ntpd 4.2.8p13"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
+5 -5
View File
@@ -1,11 +1,11 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
* It has been AutoGen-ed February 27, 2018 at 05:13:17 PM 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
* 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
* 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
* template was released.
*/
#define AO_TEMPLATE_VERSION 167936
#define AO_TEMPLATE_VERSION 167937
#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
|| (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
# error option template version mismatches autoopts/options.h header
@@ -106,9 +106,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
#define NTPD_VERSION "4.2.8p11"
#define NTPD_VERSION "4.2.8p13"
/** Full ntpd version text */
#define NTPD_FULL_VERSION "ntpd 4.2.8p11"
#define NTPD_FULL_VERSION "ntpd 4.2.8p13"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
+3 -3
View File
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntpd 1ntpdman "27 Feb 2018" "4.2.8p11" "User Commands"
.TH ntpd 1ntpdman "20 Feb 2019" "4.2.8p13" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM 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
.\" and the template file agman-cmd.tpl
.SH NAME
+2 -2
View File
@@ -1,9 +1,9 @@
.Dd February 27 2018
.Dd February 20 2019
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:47 PM 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
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
+250 -145
View File
@@ -104,6 +104,10 @@
#endif
#endif
#ifdef SYS_WINNT
# include "ntservice.h"
#endif
#ifdef _AIX
# include <ulimit.h>
#endif /* _AIX */
@@ -182,7 +186,6 @@ char *group; /* group to switch to */
const char *chrootdir; /* directory to chroot to */
uid_t sw_uid;
gid_t sw_gid;
char *endp;
struct group *gr;
struct passwd *pw;
#endif /* HAVE_DROPROOT */
@@ -523,6 +526,236 @@ set_process_priority(void)
}
#endif /* !SIM */
#if !defined(SIM) && !defined(SYS_WINNT)
/*
* Detach from terminal (much like daemon())
* Nothe that this function calls exit()
*/
# ifdef HAVE_WORKING_FORK
static void
detach_from_terminal(
int pipe_fds[2],
long wait_sync,
const char *logfilename
)
{
int rc;
int exit_code;
# if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
int fid;
# endif
# ifdef _AIX
struct sigaction sa;
# endif
rc = fork();
if (-1 == rc) {
exit_code = (errno) ? errno : -1;
msyslog(LOG_ERR, "fork: %m");
exit(exit_code);
}
if (rc > 0) {
/* parent */
exit_code = wait_child_sync_if(pipe_fds[0],
wait_sync);
exit(exit_code);
}
/*
* child/daemon
* close all open files excepting waitsync_fd_to_close.
* msyslog() unreliable until after init_logging().
*/
closelog();
if (syslog_file != NULL) {
fclose(syslog_file);
syslog_file = NULL;
syslogit = TRUE;
}
close_all_except(waitsync_fd_to_close);
INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
&& 2 == dup2(0, 2));
init_logging(progname, 0, TRUE);
/* we lost our logfile (if any) daemonizing */
setup_logfile(logfilename);
# ifdef SYS_DOMAINOS
{
uid_$t puid;
status_$t st;
proc2_$who_am_i(&puid);
proc2_$make_server(&puid, &st);
}
# endif /* SYS_DOMAINOS */
# ifdef HAVE_SETSID
if (setsid() == (pid_t)-1)
msyslog(LOG_ERR, "setsid(): %m");
# elif defined(HAVE_SETPGID)
if (setpgid(0, 0) == -1)
msyslog(LOG_ERR, "setpgid(): %m");
# else /* !HAVE_SETSID && !HAVE_SETPGID follows */
# ifdef TIOCNOTTY
fid = open("/dev/tty", 2);
if (fid >= 0) {
ioctl(fid, (u_long)TIOCNOTTY, NULL);
close(fid);
}
# endif /* TIOCNOTTY */
ntp_setpgrp(0, getpid());
# endif /* !HAVE_SETSID && !HAVE_SETPGID */
# ifdef _AIX
/* Don't get killed by low-on-memory signal. */
sa.sa_handler = catch_danger;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
sigaction(SIGDANGER, &sa, NULL);
# endif /* _AIX */
return;
}
# endif /* HAVE_WORKING_FORK */
#ifdef HAVE_DROPROOT
/*
* Map user name/number to user ID
*/
static int
map_user(
)
{
char *endp;
if (isdigit((unsigned char)*user)) {
sw_uid = (uid_t)strtoul(user, &endp, 0);
if (*endp != '\0')
goto getuser;
if ((pw = getpwuid(sw_uid)) != NULL) {
free(user);
user = estrdup(pw->pw_name);
sw_gid = pw->pw_gid;
} else {
errno = 0;
msyslog(LOG_ERR, "Cannot find user ID %s", user);
return 0;
}
} else {
getuser:
errno = 0;
if ((pw = getpwnam(user)) != NULL) {
sw_uid = pw->pw_uid;
sw_gid = pw->pw_gid;
} else {
if (errno)
msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
else
msyslog(LOG_ERR, "Cannot find user `%s'", user);
return 0;
}
}
return 1;
}
/*
* Map group name/number to group ID
*/
static int
map_group(void)
{
char *endp;
if (isdigit((unsigned char)*group)) {
sw_gid = (gid_t)strtoul(group, &endp, 0);
if (*endp != '\0')
goto getgroup;
} else {
getgroup:
if ((gr = getgrnam(group)) != NULL) {
sw_gid = gr->gr_gid;
} else {
errno = 0;
msyslog(LOG_ERR, "Cannot find group `%s'", group);
return 0;
}
}
return 1;
}
static int
set_group_ids(void)
{
if (user && initgroups(user, sw_gid)) {
msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
return 0;
}
if (group && setgid(sw_gid)) {
msyslog(LOG_ERR, "Cannot setgid() to group `%s': %m", group);
return 0;
}
if (group && setegid(sw_gid)) {
msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
return 0;
}
if (group) {
if (0 != setgroups(1, &sw_gid)) {
msyslog(LOG_ERR, "setgroups(1, %d) failed: %m", sw_gid);
return 0;
}
}
else if (pw)
if (0 != initgroups(pw->pw_name, pw->pw_gid)) {
msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
return 0;
}
return 1;
}
static int
set_user_ids(void)
{
if (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
return 0;
}
if (user && seteuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
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;
}
#endif /* HAVE_DROPROOT */
#endif /* !SIM */
/*
* Main program. Initialize us, disconnect us from the tty if necessary,
@@ -549,12 +782,6 @@ ntpdmain(
int pipe_fds[2];
int rc;
int exit_code;
# ifdef _AIX
struct sigaction sa;
# endif
# if !defined(HAVE_SETSID) && !defined (HAVE_SETPGID) && defined(TIOCNOTTY)
int fid;
# endif
# endif /* HAVE_WORKING_FORK*/
# ifdef SCO5_CLOCK
int fd;
@@ -717,6 +944,11 @@ ntpdmain(
init_lib();
# ifdef SYS_WINNT
/*
* Make sure the service is initialized before we do anything else
*/
ntservice_init();
/*
* Start interpolation thread, must occur before first
* get_systime()
@@ -736,70 +968,7 @@ ntpdmain(
if (!nofork) {
# ifdef HAVE_WORKING_FORK
rc = fork();
if (-1 == rc) {
exit_code = (errno) ? errno : -1;
msyslog(LOG_ERR, "fork: %m");
exit(exit_code);
}
if (rc > 0) {
/* parent */
exit_code = wait_child_sync_if(pipe_fds[0],
wait_sync);
exit(exit_code);
}
/*
* child/daemon
* close all open files excepting waitsync_fd_to_close.
* msyslog() unreliable until after init_logging().
*/
closelog();
if (syslog_file != NULL) {
fclose(syslog_file);
syslog_file = NULL;
syslogit = TRUE;
}
close_all_except(waitsync_fd_to_close);
INSIST(0 == open("/dev/null", 0) && 1 == dup2(0, 1) \
&& 2 == dup2(0, 2));
init_logging(progname, 0, TRUE);
/* we lost our logfile (if any) daemonizing */
setup_logfile(logfilename);
# ifdef SYS_DOMAINOS
{
uid_$t puid;
status_$t st;
proc2_$who_am_i(&puid);
proc2_$make_server(&puid, &st);
}
# endif /* SYS_DOMAINOS */
# ifdef HAVE_SETSID
if (setsid() == (pid_t)-1)
msyslog(LOG_ERR, "setsid(): %m");
# elif defined(HAVE_SETPGID)
if (setpgid(0, 0) == -1)
msyslog(LOG_ERR, "setpgid(): %m");
# else /* !HAVE_SETSID && !HAVE_SETPGID follows */
# ifdef TIOCNOTTY
fid = open("/dev/tty", 2);
if (fid >= 0) {
ioctl(fid, (u_long)TIOCNOTTY, NULL);
close(fid);
}
# endif /* TIOCNOTTY */
ntp_setpgrp(0, getpid());
# endif /* !HAVE_SETSID && !HAVE_SETPGID */
# ifdef _AIX
/* Don't get killed by low-on-memory signal. */
sa.sa_handler = catch_danger;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
sigaction(SIGDANGER, &sa, NULL);
# endif /* _AIX */
detach_from_terminal(pipe_fds, wait_sync, logfilename);
# endif /* HAVE_WORKING_FORK */
}
@@ -972,51 +1141,12 @@ ntpdmain(
# endif /* HAVE_LINUX_CAPABILITIES || HAVE_SOLARIS_PRIVS */
if (user != NULL) {
if (isdigit((unsigned char)*user)) {
sw_uid = (uid_t)strtoul(user, &endp, 0);
if (*endp != '\0')
goto getuser;
if ((pw = getpwuid(sw_uid)) != NULL) {
free(user);
user = estrdup(pw->pw_name);
sw_gid = pw->pw_gid;
} else {
errno = 0;
msyslog(LOG_ERR, "Cannot find user ID %s", user);
exit (-1);
}
} else {
getuser:
errno = 0;
if ((pw = getpwnam(user)) != NULL) {
sw_uid = pw->pw_uid;
sw_gid = pw->pw_gid;
} else {
if (errno)
msyslog(LOG_ERR, "getpwnam(%s) failed: %m", user);
else
msyslog(LOG_ERR, "Cannot find user `%s'", user);
exit (-1);
}
}
if (0 == map_user())
exit (-1);
}
if (group != NULL) {
if (isdigit((unsigned char)*group)) {
sw_gid = (gid_t)strtoul(group, &endp, 0);
if (*endp != '\0')
goto getgroup;
} else {
getgroup:
if ((gr = getgrnam(group)) != NULL) {
sw_gid = gr->gr_gid;
} else {
errno = 0;
msyslog(LOG_ERR, "Cannot find group `%s'", group);
exit (-1);
}
}
if (0 == map_group())
exit (-1);
}
if (chrootdir ) {
@@ -1050,37 +1180,8 @@ getgroup:
exit(-1);
}
# endif /* HAVE_SOLARIS_PRIVS */
if (user && initgroups(user, sw_gid)) {
msyslog(LOG_ERR, "Cannot initgroups() to user `%s': %m", user);
exit (-1);
}
if (group && setgid(sw_gid)) {
msyslog(LOG_ERR, "Cannot setgid() to group `%s': %m", group);
exit (-1);
}
if (group && setegid(sw_gid)) {
msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
exit (-1);
}
if (group) {
if (0 != setgroups(1, &sw_gid)) {
msyslog(LOG_ERR, "setgroups(1, %d) failed: %m", sw_gid);
exit (-1);
}
}
else if (pw)
if (0 != initgroups(pw->pw_name, pw->pw_gid)) {
msyslog(LOG_ERR, "initgroups(<%s>, %d) filed: %m", pw->pw_name, pw->pw_gid);
exit (-1);
}
if (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
exit (-1);
}
if (user && seteuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot seteuid() to user `%s': %m", user);
exit (-1);
}
if (0 == set_user_group_ids())
exit(-1);
# if !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS)
/*
@@ -1245,6 +1346,10 @@ int scmp_sc[] = {
}
#endif /* LIBSECCOMP and KERN_SECCOMP */
#ifdef SYS_WINNT
ntservice_isup();
#endif
# ifdef HAVE_IO_COMPLETION_PORT
for (;;) {
+765 -684
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
.TH ntpd @NTPD_MS@ "27 Feb 2018" "4.2.8p11" "User Commands"
.TH ntpd @NTPD_MS@ "20 Feb 2019" "4.2.8p13" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-Ffa4WQ/ag-RfaWVQ)
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
.\" It has been AutoGen-ed February 27, 2018 at 05:14:30 PM 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
.\" and the template file agman-cmd.tpl
.SH NAME
Loaded 100 of 1013 files, more files were not shown because too many files have changed in this diff. Show more