Bug 249163 - /var/db/ntpd.leap-seconds.list is initialized with an expired file
Summary: /var/db/ntpd.leap-seconds.list is initialized with an expired file
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.3-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Philip Paeps
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-07 10:16 UTC by martin
Modified: 2020-09-15 00:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2020-09-07 10:16:08 UTC
I have just set up a 11.3-RELEASE-p13 VM with ntpd_enable="YES" in /etc/rc.conf and found that the mechanism for installing the first /var/db/ntpd.leap-seconds.list always installs an expired file (expires 28 December 2019).

The problem is in /etc/rc.d/ntpd: ntpd_precmd calls ntpd_init_leapfile, which copies the expired file /etc/ntp/leap-seconds to /var/db/ntpd.leap-seconds.list. Then, ntpd_fetch_leapfile is never called because /var/db/ntpd.leap-seconds.list exists.

As a result, ntpd gives these messages on startup:

Sep  4 18:09:27 test ntpd[3477]: ntpd 4.2.8p12-a (1): Starting
Sep  4 18:09:27 test ntpd[3477]: Command line: /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
Sep  4 18:09:27 test ntpd[3477]: ----------------------------------------------------
Sep  4 18:09:27 test ntpd[3477]: ntp-4 is maintained by Network Time Foundation,
Sep  4 18:09:27 test ntpd[3477]: Inc. (NTF), a non-profit 501(c)(3) public-benefit
Sep  4 18:09:27 test ntpd[3477]: corporation.  Support and training for ntp-4 are
Sep  4 18:09:27 test ntpd[3477]: available at https://www.nwtime.org/support
Sep  4 18:09:27 test ntpd[3477]: ----------------------------------------------------
Sep  4 18:09:27 test ntpd[3478]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): good hash signature
Sep  4 18:09:27 test ntpd[3478]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): loaded, expire=2019-12-28T00:00:00Z last=2017-01-01T00:00:00Z ofs=37
Sep  4 18:09:27 test ntpd[3478]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expired 252 days ago