Commit graph

55 commits

Author SHA1 Message Date
Cy Schubert 018a4ab7b0 ntp: Update version strings
Reported by:	"Herbert J. Skuhra" <herbert@gojira.at>
MFC after:	3 days
Fixes:		f5f40dd63b
2024-05-27 02:19:51 -07:00
Cy Schubert f5f40dd63b ntp: Vendor import of ntp-4.2.8p18
MFC:	3 days

Merge commit '1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad' into main
2024-05-26 18:41:22 -07:00
Warner Losh 2a63c3be15 Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:29 -06:00
Cy Schubert e6bfd18d21 ntp: import ntp-4.2.8p17
Fixes two small bugs including one regression.

MFC after:	3 days

Merge commit 'ab1f1aa8333369a83ff284848fc3fc2e52d5f29f'
2023-06-06 05:44:51 -07:00
Cy Schubert 4d78061377 ntp: Update version string
Chase a466cc5537, updating the version string in the local config.h.

Reported by:	 Trond Endrestol <Trond.Endrestol@ximalas.info>
Fixes:		a466cc5537
MFC after:	immediately
2023-06-01 14:50:22 -07:00
Ed Maste b668975218 ntp: retire now-unused MIPS cases 2022-10-19 15:36:23 -04:00
Brandon Bergren ab2032371e [PowerPC] Fix multiple ntp configuration issues
* powerpc time_t is 64 bit, not 32 bit.

* Add definition for powerpc64le.

With this, powerpc64le ntpd and ntpdate operate correctly instead of
corrupting the clock and exiting.

Tested on powerpc64, powerpc64le, and powerpc.

No feedback from cy@.

I am a bit confused as to how SIZEOF_TIME_T being wrong ever worked on
powerpc, it being big endian and all.

Sponsored by:	Tag1 Consulting, Inc.
Differential Revision:	https://reviews.freebsd.org/D26379
2020-09-23 02:37:27 +00:00
Cy Schubert 767173cec2 MFV r362565:
Update 4.2.8p14 --> 4.2.8p15

Summary: Systems that use a CMAC algorithm in ntp.keys will not release
a bit of memory on each packet that uses a CMAC keyid, eventually causing
ntpd to run out of memory and fail. The CMAC cleanup from
https://bugs.ntp.org/3447, part of ntp-4.2.8p11, introduced a bug whereby
the CMAC data structure was no longer completely removed.

MFC after:	3 days
Security:	NTP Bug 3661
2020-06-24 01:51:05 +00:00
Cy Schubert b323455767 PACKAGE_STRING should be the same as PACKAGE_VERSION.
MFC after:	3 days
2020-03-18 22:14:25 +00:00
Cy Schubert 2d4e511ca2 MFV r358616:
Update ntp-4.2.8p13 --> 4.2.8p14.

The advisory can be found at:
http://support.ntp.org/bin/view/Main/SecurityNotice#\
March_2020_ntp_4_2_8p14_NTP_Rele

No CVEs have been documented yet.

MFC after:	now
Security:	http://support.ntp.org/bin/view/Main/NtpBug3610
		http://support.ntp.org/bin/view/Main/NtpBug3596
		http://support.ntp.org/bin/view/Main/NtpBug3592
2020-03-04 21:45:12 +00:00
Warner Losh 5b2df92a39 Use __riscv instead of __riscv__
I misread arch(7) when I added this...

Noticed by: jhb@ and mhorne@
2020-02-10 18:28:02 +00:00
Warner Losh 6666787858 Refresh architecture list with latest:
Remove: sparc, sparc64 (twice), ia64, alpha
Add: riscv64

Remove now-useless sparc64 ifdef

Reivewed by: cy@, bcr@
Differential Revision: https://reviews.freebsd.org/D23593
2020-02-10 17:17:03 +00:00
Cy Schubert 964c4a37b0 Chase r344883. ntp is 4.2.8p13.
MFC after:	3 days
2019-11-21 20:15:22 +00:00
Cy Schubert 854cab511e No longer mlock() ntpd pages by default in memory thus allowing its
pages to page as necessary.

To restore historic BSD behaviour add the following to ntp.conf:
	rlimit memlock 32

Discussed on:	freebsd-current@ between Sept 6-9, 2019
Reported by:	Users using ASLR with stack gap != 0
Reviewed by:	ian, kib, rgrimes (all previous versions)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D21581
2019-09-13 20:20:05 +00:00
Xin LI 4e1ef62a36 MFV r338092: ntp 4.2.8p12.
Relnotes:	yes
2018-08-21 02:38:07 +00:00
Ian Lepore 3496c981ac Make it possible to run ntpd as a non-root user, add ntpd uid and gid.
Code analysis and runtime analysis using truss(8) indicate that the only
privileged operations performed by ntpd are adjusting system time, and
(re-)binding to privileged UDP port 123. These changes add a new mac(4)
policy module, mac_ntpd(4), which grants just those privileges to any
process running with uid 123.

This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes
them the owner of the /var/db/ntp directory, so that it can be used as a
location where the non-privileged daemon can write files such as the
driftfile, and any optional logfile or stats files.

Because there are so many ways to configure ntpd, the question of how to
configure it to run without root privs can be a bit complex, so that will be
addressed in a separate commit. These changes are just what's required to
grant the limited subset of privs to ntpd, and the small change to ntpd to
prevent it from exiting with an error if running as non-root.

Differential Revision:	https://reviews.freebsd.org/D16281
2018-07-19 23:55:29 +00:00
Xin LI 0910025859 MFV r330102: ntp 4.2.8p11 2018-02-28 07:59:55 +00:00
Xin LI f0574f5cf6 MFV r315791: ntp 4.2.8p10. 2017-03-23 22:06:06 +00:00
Cy Schubert 6a1588c0a4 Configure leap-second smearing (always).
Leap-second smearing is an experimental option that may be specified in
ntp.conf(5) and the -x option on the command line to spread the effect
of a leap-second over an interval as specified by the leapsmearinterval
config file statement. Recommended values are between 7200 (2 hours) and
86400 (24 hours).

It is advised that leap-second smearing not be used for public NTP
servers (https://www.meinbergglobal.com/download/burnicki/Leap\
%20Second%20Smearing%20With%20NTP.pdf). It is also advised that NTP
clients not use a mix of NTP servers using leap-second smearing with
NTP servers not using leap-second smearing as that could cause
undefined client behaviour.

Leap-second smearing was committed to ports net/ntp and net/ntp-devel
by r426825 on 2016-11-22.

Suggested by:	des
MFC after:	4 weeks
2017-03-09 05:29:24 +00:00
Xin LI f391d6bc1d MFV r308954:
ntp 4.2.8p9.

Approved by:	so
2016-11-22 08:27:49 +00:00
Xin LI e27abb6689 MFV r301238:
ntp 4.2.8p8.

Security:	CVE-2016-4957, CVE-2016-4953, CVE-2016-4954
Security:	CVE-2016-4955, CVE-2016-4956
Security:	FreeBSD-SA-16:24.ntp
With hat:	so
2016-06-03 08:00:22 +00:00
Xin LI 4990d495fc MFV r298691:
ntp 4.2.8p7.

Security:	CVE-2016-1547, CVE-2016-1548, CVE-2016-1549, CVE-2016-1550
Security:	CVE-2016-1551, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518
Security:	CVE-2016-2519
Security:	FreeBSD-SA-16:16.ntp
With hat:	so
2016-04-27 07:46:38 +00:00
Xin LI 68ba7e87e7 MFV r294491: ntp 4.2.8p6.
Security:	CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security:	CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security:	CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security:	CVE-2015-8140, CVE-2015-8158
With hat:	so
2016-01-22 07:32:39 +00:00
Xin LI 3311ff84ea MFV r293415:
ntp 4.2.8p5

Reviewed by:	cy, roberto
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4828
2016-01-08 15:53:48 +00:00
Gleb Smirnoff 01ddbee86b A miss from r289764. 2015-10-23 05:03:34 +00:00
Gleb Smirnoff 9034852c84 MFV ntp-4.2.8p4 (r289715)
Security:       VuXML: c4a18a12-77fc-11e5-a687-206a8a720317
Security:	CVE-2015-7871
Security:	CVE-2015-7855
Security:	CVE-2015-7854
Security:	CVE-2015-7853
Security:	CVE-2015-7852
Security:	CVE-2015-7851
Security:	CVE-2015-7850
Security:	CVE-2015-7849
Security:	CVE-2015-7848
Security:	CVE-2015-7701
Security:	CVE-2015-7703
Security:	CVE-2015-7704, CVE-2015-7705
Security:	CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner
Sponsored by:	Nginx, Inc.
2015-10-22 19:42:57 +00:00
Cy Schubert 9bf168600c Turn on RAWDCF by default.
Suggested by:	ian
Approved by:	roberto
MFC after:	1 week
2015-09-04 16:59:01 +00:00
Xin LI 788aa07e34 Use fixed date/time (the time choosen was the time the import was done on
-HEAD) in libntp so we can make reproducible build.

PR:		bin/201661
Reviewed by:	gjb, cy, roberto
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3122
2015-07-19 19:23:38 +00:00
Cy Schubert 21e17e1fc8 Update ntp version number. (This is a manual update that was missed.) 2015-07-05 16:48:40 +00:00
Cy Schubert b1cf398e01 Add support for additional architectures in ntp.
Differential Revision:	D2720
Reviewed by:	jmg, reoberto, andrew, ian, imp
2015-06-26 03:29:23 +00:00
Baptiste Daroussin ef0cb5db0a Fix overlinking again after recent ntp updates
Fix building WITHOUT_OPENSSL
2015-05-25 20:27:46 +00:00
Cy Schubert 36428b7e17 Restore CPU dependent compile time conditionals.
MFC after:	1 month (with r281143 and r282408)
2015-05-04 12:42:52 +00:00
Cy Schubert a25439b686 MFV ntp 4.2.8p2 (r281348)
Reviewed by:    delphij (suggested MFC)
Approved by:	roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after:	1 month
2015-05-04 04:45:59 +00:00
Gleb Smirnoff 56d5e0967c Stop including if_var.h from userland.
Sponsored by:	Nginx, Inc.
2015-04-06 09:42:23 +00:00
Cy Schubert 2b15cb3d09 MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
2015-03-30 13:30:15 +00:00
Marcel Moolenaar e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Ollivier Robert be77ef1b5f Meinberg clocks support was inadvertently removed during the last vendor
import.  Add it back.

PR:		bin/182545
Submitted by:	Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Approved by:	re (delphij)
MFC after:	1 week
2013-10-02 21:47:25 +00:00
Gleb Smirnoff d48088aab1 Enable the shared memory reference clock driver. The GPS devices are
getting more and more popular, as source of precise time, and the gpsd
daemon from ports is using the shared memory to synchronize with ntpd.

Reviewed by:	roberto
2010-10-14 11:20:23 +00:00
Ed Schouten 918592df59 Disable the unneeded inclusion of <utmp.h>.
The utmp code in systime.c is not enabled, so including <utmp.h> has no
effect in our setup. This makes it a little easier for me to migrate to
<utmpx.h>.

Approved by:	roberto
2009-12-26 18:32:35 +00:00
Ollivier Robert 943b1a0f32 Makefile.inc already defines OPENSSL if crypto is available/wanted.
PR:		bin/127296
Submitted by:	oliver
MFC after:	3 days
2008-09-11 20:32:06 +00:00
Ollivier Robert d9759c011c Allow again compilation w/o GNU readline. There are conditionals in
{ntpdc,ntpq}/Makefile.

Submitted by:	Ben Kelly <bkelly@vadev.org>
2008-09-02 14:00:17 +00:00
Ollivier Robert 271c3a9060 Update the various files to sync with vendor import of 4.2.4p5.
sntp includes a copy of libopts in itself in vendor code, rewrite the
Makefile to compile and use only one copy.  It is an internal library, not
installed.

MFC after:	2 weeks
2008-08-22 16:00:48 +00:00
Ollivier Robert c0027f5b49 Add Meinberg clocks to the default ntpd. It contains both a DCF77 and a GPS
receiver.

PR:				bin/78207
Submitted by:	Joerg Pulz <Joerg.Pulz@frm2.tum.de>
Approved by:    re (scottl)
2005-06-23 21:37:27 +00:00
Ollivier Robert e47c4441d3 mlockall(2) was introduced during the 5.0-CURRENT lifetime. 2004-07-25 22:02:30 +00:00
Ollivier Robert 0883223a5f Include support for NOCRYPT & NO_OPENSSL world.
It does survive « make release ».

Uses an upcoming patch from the vendor branch (ntp-stable) of ntp-keygen.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-07-22 09:10:52 +00:00
Ollivier Robert d060ebf7b2 Allow ntpd to be compiled w/o readline when NO_GNU is defined. Part of a
larger patchset to get a GNU-free world.

Patch rewritten to cope with the 4.2.0 changes.

Submitted by:	des
2004-07-22 08:14:37 +00:00
Ollivier Robert 6cb84f0c29 Update our ntpd to the long awaited 4.2.0 version.
This bring us several things:
- updated drivers
- IPv6 support at last
- ntp-genkeys is replaced by ntp-keygen
- ntptrace is now a script (courtesy of John Hay)
- lots of renamed files from .htm to .html (while I prefer .html, I
  find the change a bit gratuitous)
- still no manpages :(

Please test and report.

Commit very much helped by: GNU arch (http://gnuarch.org/)
2004-07-20 15:44:32 +00:00
Jens Schweikhardt 9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Ollivier Robert e265e481d7 Update ntpd to 4.1.1b. There are two new drivers and the usual bunch of
fixes. See contrib/ntp/ChangeLog for details.

MFC after:	1 month
Prodded by:	jhay
Tested on:	sparc64 (panther), alpha (beast) and i386.
2002-11-04 19:44:26 +00:00
Ollivier Robert a5b1043f74 Update ntpd to 4.1.1a. This contains many bug fixes made on the STABLE
branch and a few new drivers. See contrib/ntp/ChangeLog for details.

Hide kernel header sys/lock.h from ntp [1]

PR:		bin/33914
Submitted by:	thomas, bde[1]
MFC after:	1 month
2002-10-29 20:20:36 +00:00