]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r348141, r348143
authorIan Lepore <ian@FreeBSD.org>
Sun, 23 Jun 2019 16:00:29 +0000 (16:00 +0000)
committerIan Lepore <ian@FreeBSD.org>
Sun, 23 Jun 2019 16:00:29 +0000 (16:00 +0000)
commita9ccea3e6d33f210f1694259cb1ee0572258b173
treef798ef649ab530408cd11e2a707eaf5c3c188ff9
parentc57bd76e85054a00b235eda74963ff5f4bb764fa
MFC r348141, r348143

r348141:
Handle the driftfile option correctly when ntpd_flags is empty.

The logic I originally wrote to detect whether a driftfile option was in the
set of flags was based on the result of removing the pattern *flag* being an
empty string.  That didn't handle the case where the string was empty to
begin with.  Doh!  So now it also specifically checks for an empty string.

The result of the bad check was that ntpd would run without a driftfile, but
it would do so only if it was running as root instead of the non-priveleged
ntpd user, which isn't a typical case.  Ntpd runs fine without a driftfile,
although it does take it longer to stabilize the clock frequency at startup.

Reported by: avg@
Pointy hat: ian@

r348143:
Remove accidentally-added blank line; the style throughout this file
is to use no whitespace between a comment block and the code it describes.
libexec/rc/rc.d/ntpd