MFC r304779, r304780, r304781, r304782, r304802
authorcy <cy@FreeBSD.org>
Sat, 27 Aug 2016 02:53:21 +0000 (02:53 +0000)
committercy <cy@FreeBSD.org>
Sat, 27 Aug 2016 02:53:21 +0000 (02:53 +0000)
commitcd108e3a70d32cac160a084fedee33f0d52a3c58
treec59a300721287e23bd64e4e76aa784202daeda4d
parentdbd92a2d58ddf029a5692eca924eac0183ff23c8
MFC r304779, r304780, r304781, r304782, r304802

r304779:

  Revert r298887 (spelling fix) and remove $FreeBSD$ because text changes
  to leap-seconds invaldidates validation hash at the end of the file.

  Remove svn:keywords and replace with fbsd:nokeywords=yes to
  support this change.

r304780:

  Change the algorithm by which /var/db/leap-seconds is updated.

  1. Use the leap-seconds version number (update time) to determine
     whether to update the file or not.

  2. If the version numbers of the files is the same, use the later
     expiry date to determine which file to use.

  Suggested by: ian@

r304781:

  Add logic to replace the working ntp leap-seconds file in /var/db
  if it contains a $FreeBSD$ header. The header will cause the file
  to fail checksum of the hash causing ntpd to ignore the file.

r304782:

  Make validation of the leap-seconds file unconditional.

r304802:

  Remove the gratuitous check for $FreeBSD$ and rename the function
  to ntpd_init_leapfile, to ensure a copy exists in /var/db if a copy
  isn't already there.

  Reported by: ache@
etc/ntp/leap-seconds
etc/rc.d/ntpd