Commit Graph

236 Commits

Author SHA1 Message Date
Xin LI
8a607939de Update leap-seconds to leap-seconds.3676924800
Obtained from:  ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800
MFC after:      3 days
2024-06-18 19:10:33 -07:00
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
Lexi Winter
2f9966ff63 packages: add package for NTP
Reviewed by: imp, manu
Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
2024-05-04 07:41:54 -06:00
Xin LI
832c63f5e0 Update leap-seconds to leap-seconds.3676924800
Obtained from:  ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2023-11-25 17:13:23 -08:00
Warner Losh
fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh
2a63c3be15 Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:29 -06:00
Warner Losh
42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -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
Cy Schubert
a466cc5537 ntp: import ntp-4.2.8p16
Security:       NtpBUg3767, NtpBug3808, NtpBug3807 (CVE-2023-26555)
MFC after:	immediately
2023-06-01 07:04:37 -07:00
Mina Galic
fff1551c03 ntpd: Support IPv6-only hosts
0.pool.* returns only IPv4 addresses.
2.pool.* returns both, IPv6 and IPv4 addresses.

conservatively extend our IPv4 only pool configuration by adding a
second pool, which also returns IPv6 addresses.

PR:			270536
Reported by:		Lapo Luchini <lapo@lapo.it>
MFC after:		3 days
Pull Request:		https://github.com/freebsd/freebsd-src/pull/731
Differential Revision:	https://reviews.freebsd.org/D39954
2023-05-04 21:37:02 -07:00
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Dimitry Andric
df2fbbfa71 Update leap-seconds to latest leap-seconds.3676924800 (expires 2023-12-28)
Obtained from:	ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2023-02-24 13:18:05 +01:00
Ed Maste
b668975218 ntp: retire now-unused MIPS cases 2022-10-19 15:36:23 -04:00
Xin LI
1d33307434 Update leap-seconds to leap-seconds.3676924800
Obtained from:	ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2022-03-13 23:37:56 -07:00
Ed Maste
1ffe6d7909 ntp: disable format string warnings in libopts
libopts uses generated format string tables that contain embedded NULs.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34386
2022-02-27 16:31:01 -05:00
Cy Schubert
733a832fb5 ntp: Revert "Disable stack gap for ntpd during build."
This reverts commit af949c590b because
889b56c8cd fixes the underlying problem.

MFC after:	1 month
2021-10-15 16:06:14 -07:00
Elyes HAOUAS
da3278ded3 ntp.conf.5: Fix typos
"certian" --> "certain"
"compatability" --> "compatibility"
"noticable" --> "noticeable"
"limite" --> "limit"
"acutal" --> "actual"
"ba" --> "be"

MFC after:	1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/550
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-06 10:16:04 -04:00
Xin LI
7ba7bf48d5 Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800.
MFC after:	3 days
2021-09-19 22:26:22 -07:00
Marcin Wojtas
af949c590b Disable stack gap for ntpd during build.
When starting, ntpd calls setrlimit(2) to limit maximum size of its
stack. The stack limit chosen by ntpd is 200K, so when stack gap
is enabled, the stack gap is larger than this limit, which results
in ntpd crashing.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: cy, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29553
2021-05-21 15:33:06 +02:00
Xin LI
2edcc10cb1 Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2020-12-29 22:01:46 -08: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
Ed Maste
7cccb910b2 ntp: whitespace and typo fix in conf file
PR:		248942
Submitted by:	Jose Luis Duran (whitespace), igor (typo)
MFC after:	1 week
2020-09-07 17:19:31 +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
Xin LI
a918433b8a Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2020-05-19 16:06:03 +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
0d3f465b5d Remove ifdefs for ia64 and sparc64.
Reivewed by: cy@, bcr@
Differential Revision: https://reviews.freebsd.org/D23593
2020-02-10 17:17:08 +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
Adrian Chadd
ab95087a0e [ntp] Don't compile in the ssl routines into libevent if MK_OPENSSL is no
Most of ntpd still handles MK_OPENSSL ok, but the libevent import brought
in the SSL bufferevent routines without checking MK_OPENSSL.

This doesn't completely fix WITHOUT_CRYPTO=YES building, but hey, it's one
less broken thing.
2020-01-24 06:24:40 +00:00
Conrad Meyer
15da83398e ntpd(8): Don't use OpenSSL's RAND API
The !USE_OPENSSL_CRYPTO_RAND path uses arc4random_buf() correctly.

In general, we should prefer to avoid things OpenSSL does poorly when a good
alternative exists in libc.
2019-12-13 05:54:38 +00:00
Kyle Evans
5bff36fe81 usr.sbin/ntp: don't emit versions w/ make -s
<sys.mk> defines ECHO=echo when not using make -s, and ECHO=true when using
make -s.

export ECHO for ntp products and use it in the mkver script to echo the
version. This suppresses the output as appropriate. ECHO is given a default
value to make sure things still work as expected for anyone that isn't
redefining ECHO.

Reviewed by:	cy
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22101
2019-12-12 01:33:45 +00:00
Simon J. Gerraty
2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Simon J. Gerraty
5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Cy Schubert
d48778bb2a Chase r352304. The default rlimit memlock is no memory locking.
Reported by:	egypcio@
MFC after:	3 days
2019-12-04 15:04:06 +00:00
Xin LI
1861313623 Update leap-seconds to leap-seconds.3676924800.
Obtained from:	ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after:	3 days
2019-11-27 07:51:29 +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
1e8687d261 Reduce calls to close(2) at startup through the use of closefrom(2).
Submitted by:	pawel.biernacki@gmail.com
Reviewed by:	mjg, cy
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D21715
2019-09-19 14:45:04 +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
Baptiste Daroussin
469ce69391 Get the readline header from the installed header instead of the from the source
location.

With newer import of libedit, the path to be able to access readline/readline.h
will also include header which name will conflict with some expected by ntp in
another path and end up breaking the build.
2019-09-12 15:46:58 +00:00
Baptiste Daroussin
97889d2e15 Remove useless extra definition of libedit flags
Note that all the line editor part is done in the libntp
2019-09-12 15:44:53 +00:00
Warner Losh
91f5df38c9 MK_OPENSSL makes RELEASE_CRUNCH redundant here
Since these things are more completely controlled by the MK_OPENSSL knob, remove
RELEASE_CRUNCH here. It's no longer needed for the release and other users can
use the more proper knob if they so desire.
2019-07-15 07:39:28 +00:00
Xin LI
65ec2ae389 Replace the leap-seconds file in r347488 from USNO with a
leap-seconds file from NIST at ftp://ftp.nist.gov/pub/time.

Future updates should use the NIST version of file, available
at ftp://ftp.nist.gov/pub/time/leap-seconds.list .

Requested by:   ian@
Obtained from:  ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800
MFC after:      3 days
2019-05-15 03:39:27 +00:00
Xin LI
7fa22f746b Update leap-seconds to leap-seconds.3757622400.
As per https://datacenter.iers.org/data/latestVersion/16_BULLETIN_C16.txt:

     INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)

SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE

SERVICE DE LA ROTATION TERRESTRE DE L'IERS
OBSERVATOIRE DE PARIS
61, Av. de l'Observatoire 75014 PARIS (France)
Tel.      : +33 1 40 51 23 35
e-mail    : services.iers@obspm.fr
http://hpiers.obspm.fr/eop-pc

                                              Paris, 07 January 2019

                                              Bulletin C 57

                                              To authorities responsible
                                              for the measurement and
                                              distribution of time

                          INFORMATION ON UTC - TAI

 NO leap second will be introduced at the end of June 2019.
 The difference between Coordinated Universal Time UTC and the
 International Atomic Time TAI is :

     from 2017 January 1, 0h UTC, until further notice : UTC-TAI = -37 s

 Leap seconds can be introduced in UTC at the end of the months of December
 or June,  depending on the evolution of UT1-TAI. Bulletin C is mailed every
 six months, either to announce a time step in UTC, or to confirm that there
 will be no time step at the next possible date.

                                            Christian BIZOUARD
                                            Director
                                            Earth Orientation Center of IERS
					    Observatoire de Paris, France

Requested by:	rgrimes
Obtained from:	ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3757622400
MFC after:	3 days
2019-05-11 14:22:21 +00:00
Cy Schubert
052d159a8b MFV r344878:
4.2.8p12 --> 4.2.8p13

MFC after:	immediately
Security:	CVE-2019-8936
		VuXML: c2576e14-36e2-11e9-9eda-206a8a720317
Obtained from:	nwtime.org
2019-03-07 13:36:00 +00:00
Renato Botelho
66a12de518 Fix typo introduced in r340439 - s/ETN/ETC/
Reported by:	jhb, yuripv
Approved by:	eugen
MFC after:	3 days
X-MFC-With:	340439
Sponsored by:	Rubicon Communications, LLC (Netgate)
2018-11-14 18:38:27 +00:00
Renato Botelho
f7f458b592 Fix /etc/ntp permissions. According to mtree it must be 0700
Reviewed by:	imp
Approved by:	imp
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D17973
2018-11-14 16:19:15 +00:00