]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
6 years agoupdate copyright years
Miroslav Lichvar [Wed, 12 Sep 2018 09:35:27 +0000 (11:35 +0200)] 
update copyright years

6 years agoexamples: drop chrony.spec
Miroslav Lichvar [Wed, 12 Sep 2018 08:51:41 +0000 (10:51 +0200)] 
examples: drop chrony.spec

The example spec file was too limited to be recommended for use in any
rpm-based distribution, e.g. it didn't configure chronyd to drop the
root privileges.

Users that want to build a package from the latest source code should
start with the official package of their distribution.

6 years agoexamples: improve description in chrony.keys example
Miroslav Lichvar [Wed, 12 Sep 2018 08:43:13 +0000 (10:43 +0200)] 
examples: improve description in chrony.keys example

6 years agodoc: warn about permissions in keyfile description
Miroslav Lichvar [Wed, 12 Sep 2018 08:43:01 +0000 (10:43 +0200)] 
doc: warn about permissions in keyfile description

6 years agotest: fix samplefilt unit test to work with low-precision clock
Miroslav Lichvar [Mon, 10 Sep 2018 12:51:30 +0000 (14:51 +0200)] 
test: fix samplefilt unit test to work with low-precision clock

6 years agosamplefilt: use SQUARE macro in SPF_CreateInstance()
Miroslav Lichvar [Mon, 10 Sep 2018 11:20:14 +0000 (13:20 +0200)] 
samplefilt: use SQUARE macro in SPF_CreateInstance()

6 years agoexamples: update chrony.conf example for new default pidfile
Miroslav Lichvar [Mon, 10 Sep 2018 08:37:37 +0000 (10:37 +0200)] 
examples: update chrony.conf example for new default pidfile

6 years agotest: make 129-reload more reliable
Miroslav Lichvar [Fri, 31 Aug 2018 10:48:07 +0000 (12:48 +0200)] 
test: make 129-reload more reliable

6 years agoconfigure: fix compiler warning in pthread test code
Miroslav Lichvar [Fri, 31 Aug 2018 09:04:36 +0000 (11:04 +0200)] 
configure: fix compiler warning in pthread test code

6 years agodoc: update NEWS 3.4-pre1
Miroslav Lichvar [Fri, 31 Aug 2018 08:11:17 +0000 (10:11 +0200)] 
doc: update NEWS

6 years agotest: extend 110-chronyc test
Miroslav Lichvar [Fri, 31 Aug 2018 07:26:45 +0000 (09:26 +0200)] 
test: extend 110-chronyc test

6 years agotest: extend 106-refclock test
Miroslav Lichvar [Fri, 31 Aug 2018 06:42:46 +0000 (08:42 +0200)] 
test: extend 106-refclock test

6 years agodoc: update FAQ
Miroslav Lichvar [Wed, 29 Aug 2018 14:23:42 +0000 (16:23 +0200)] 
doc: update FAQ

6 years agoconfigure: fix detection of timepps.h on NetBSD
Miroslav Lichvar [Thu, 30 Aug 2018 09:43:53 +0000 (11:43 +0200)] 
configure: fix detection of timepps.h on NetBSD

The header requires <time.h> for struct timespec.

6 years agorefclock: fix compiler warning on FreeBSD
Miroslav Lichvar [Thu, 30 Aug 2018 09:32:11 +0000 (11:32 +0200)] 
refclock: fix compiler warning on FreeBSD

6 years agontp: add support for IP_RECVDSTADDR and IP_SENDSRCADDR
Miroslav Lichvar [Thu, 30 Aug 2018 09:15:11 +0000 (11:15 +0200)] 
ntp: add support for IP_RECVDSTADDR and IP_SENDSRCADDR

FreeBSD doesn't support IP_PKTINFO. Instead it provides IP_RECVDSTADDR
and IP_SENDSRCADDR, which can be used to get/set the destination/source
address.

In future IP_RECVIF and IP_SENDIF may be supported to get and set also
the interface.

6 years agontp: set interface index in IP*_PKTINFO when responding
Miroslav Lichvar [Wed, 29 Aug 2018 08:56:14 +0000 (10:56 +0200)] 
ntp: set interface index in IP*_PKTINFO when responding

When a server with multiple interfaces in the same network is sending a
response, setting the ipi_spec_dst/ipi6_addr field of the IP*_PKTINFO
control message selects the source address, but not necessarily the
interface. The packet has the expected source address, but it may be
sent by an interface that doesn't have the address.

Set the ipi_ifindex/ipi6_ifindex field to respond on the same interface
as the request was received from to avoid asymmetries in delay and
timestamping.

6 years agotest: add 133-hwtimestamp test
Miroslav Lichvar [Wed, 29 Aug 2018 16:08:43 +0000 (18:08 +0200)] 
test: add 133-hwtimestamp test

6 years agotest: add 132-logchange test
Miroslav Lichvar [Tue, 28 Aug 2018 16:13:52 +0000 (18:13 +0200)] 
test: add 132-logchange test

6 years agotest: add 131-maxchange test
Miroslav Lichvar [Tue, 28 Aug 2018 16:00:16 +0000 (18:00 +0200)] 
test: add 131-maxchange test

6 years agotest: extend 108-peer test
Miroslav Lichvar [Mon, 27 Aug 2018 12:17:18 +0000 (14:17 +0200)] 
test: extend 108-peer test

6 years agotest: don't override user settings with default values
Miroslav Lichvar [Mon, 27 Aug 2018 11:34:49 +0000 (13:34 +0200)] 
test: don't override user settings with default values

This fixes commit 671daf06b832940bb331242d07462c0f69be9618.

6 years agotest: extend ntp_core unit test
Miroslav Lichvar [Mon, 27 Aug 2018 15:18:20 +0000 (17:18 +0200)] 
test: extend ntp_core unit test

6 years agotest: update hash unit test
Miroslav Lichvar [Mon, 27 Aug 2018 15:32:38 +0000 (17:32 +0200)] 
test: update hash unit test

6 years agotest: enable unit tests to suspend logging
Miroslav Lichvar [Tue, 28 Aug 2018 12:20:40 +0000 (14:20 +0200)] 
test: enable unit tests to suspend logging

6 years agologging: allow reopening stderr
Miroslav Lichvar [Tue, 28 Aug 2018 12:10:21 +0000 (14:10 +0200)] 
logging: allow reopening stderr

LOG_OpenFileLog(NULL) can be now used to reopen stderr.

6 years agologging: close previous file log after opening new one
Miroslav Lichvar [Tue, 28 Aug 2018 12:04:44 +0000 (14:04 +0200)] 
logging: close previous file log after opening new one

Currently, the log is always opened only once, but that will change with
tests temporarily suspending logging.

6 years agontp: optimize MAC truncation
Miroslav Lichvar [Mon, 27 Aug 2018 15:20:56 +0000 (17:20 +0200)] 
ntp: optimize MAC truncation

When generating a MAC for an NTP packet, request only the bytes that
will be sent.

6 years agohash: allow truncated output
Miroslav Lichvar [Mon, 27 Aug 2018 14:26:01 +0000 (16:26 +0200)] 
hash: allow truncated output

Tomcrypt, some NSS hash functions, and the internal MD5 require the
output buffer to be at least as long as the digest. To provide the same
hashing API with all four options, use an extra buffer for the digest
when necessary and copy only the requested bytes to the caller.

6 years agontp: remove unnecessary constant
Miroslav Lichvar [Mon, 27 Aug 2018 12:12:23 +0000 (14:12 +0200)] 
ntp: remove unnecessary constant

6 years agosources: check maximum reach size before postponing update
Miroslav Lichvar [Mon, 27 Aug 2018 11:11:49 +0000 (13:11 +0200)] 
sources: check maximum reach size before postponing update

Don't wait for other sources to be selectable when the maximum
selectable and non-selectable reachability registers happen to match
and a register is already full (e.g. after heavy packet loss).

6 years agodoc: improve description of LastRx column in chronyc sources
Miroslav Lichvar [Mon, 27 Aug 2018 09:26:21 +0000 (11:26 +0200)] 
doc: improve description of LastRx column in chronyc sources

6 years agotest: add 130-quit test
Miroslav Lichvar [Fri, 24 Aug 2018 14:56:09 +0000 (16:56 +0200)] 
test: add 130-quit test

6 years agotest: add 129-reload test
Miroslav Lichvar [Fri, 24 Aug 2018 14:33:20 +0000 (16:33 +0200)] 
test: add 129-reload test

6 years agotest: add 128-nocontrol test
Miroslav Lichvar [Fri, 24 Aug 2018 13:40:12 +0000 (15:40 +0200)] 
test: add 128-nocontrol test

6 years agotest: separate client/server chronyd options
Miroslav Lichvar [Fri, 24 Aug 2018 13:05:58 +0000 (15:05 +0200)] 
test: separate client/server chronyd options

6 years agotest: avoid using eval in shell scripts
Miroslav Lichvar [Fri, 24 Aug 2018 12:56:04 +0000 (14:56 +0200)] 
test: avoid using eval in shell scripts

6 years agotest: extend util unit test
Miroslav Lichvar [Fri, 24 Aug 2018 12:19:40 +0000 (14:19 +0200)] 
test: extend util unit test

6 years agotest: add samplefilt unit test
Miroslav Lichvar [Thu, 23 Aug 2018 15:06:50 +0000 (17:06 +0200)] 
test: add samplefilt unit test

6 years agotest: add sanitizers test
Miroslav Lichvar [Wed, 22 Aug 2018 15:19:16 +0000 (17:19 +0200)] 
test: add sanitizers test

6 years agotest: detect configure errors in compilation test
Miroslav Lichvar [Wed, 22 Aug 2018 13:05:56 +0000 (15:05 +0200)] 
test: detect configure errors in compilation test

6 years agotest: add -Werror to CFLAGS in compilation test
Miroslav Lichvar [Wed, 22 Aug 2018 13:03:59 +0000 (15:03 +0200)] 
test: add -Werror to CFLAGS in compilation test

6 years agodoc: update description of -r option
Miroslav Lichvar [Fri, 24 Aug 2018 14:09:21 +0000 (16:09 +0200)] 
doc: update description of -r option

6 years agosourcestats: improve debug message in SST_GetTrackingData()
Miroslav Lichvar [Fri, 24 Aug 2018 10:43:27 +0000 (12:43 +0200)] 
sourcestats: improve debug message in SST_GetTrackingData()

6 years agosources: use SQUARE macro in combine_sources()
Miroslav Lichvar [Fri, 24 Aug 2018 07:45:00 +0000 (09:45 +0200)] 
sources: use SQUARE macro in combine_sources()

6 years agosamplefilt: check for non-increasing sample times
Miroslav Lichvar [Thu, 23 Aug 2018 12:19:16 +0000 (14:19 +0200)] 
samplefilt: check for non-increasing sample times

Adopt the check from the refclock code to check also samples from NTP.

6 years agotest: update hwclock unit test
Miroslav Lichvar [Tue, 21 Aug 2018 14:50:58 +0000 (16:50 +0200)] 
test: update hwclock unit test

6 years agosys_linux: extend debug message
Miroslav Lichvar [Tue, 21 Aug 2018 11:23:12 +0000 (13:23 +0200)] 
sys_linux: extend debug message

6 years agosys_linux: improve support for upcoming kernel versions
Miroslav Lichvar [Tue, 21 Aug 2018 11:04:21 +0000 (13:04 +0200)] 
sys_linux: improve support for upcoming kernel versions

Starting with Linux 4.19, the frequency of the system clock should be
updated immediately in the system call itself, which will significantly
reduce the maximum delay of the update.

Increase the assumed tick rate in order to reduce the dispersion
accumulated by the driver when it sets the frequency.

6 years agotest: make 121-orphan more reliable
Miroslav Lichvar [Tue, 21 Aug 2018 12:11:30 +0000 (14:11 +0200)] 
test: make 121-orphan more reliable

6 years agoreference: refactor estimation of clock frequency
Miroslav Lichvar [Tue, 21 Aug 2018 10:10:41 +0000 (12:10 +0200)] 
reference: refactor estimation of clock frequency

Reorder code in REF_SetReference(), clean it up a bit, and split off the
parts specific to the weighting and estimation of the new frequency.

6 years agoreference: include skew in local sync status setting
Miroslav Lichvar [Fri, 17 Aug 2018 14:05:47 +0000 (16:05 +0200)] 
reference: include skew in local sync status setting

6 years agosourcestats: include offset SD in tracking root dispersion
Miroslav Lichvar [Fri, 17 Aug 2018 14:05:33 +0000 (16:05 +0200)] 
sourcestats: include offset SD in tracking root dispersion

6 years agoutil: introduce SQUARE macro
Miroslav Lichvar [Fri, 17 Aug 2018 09:16:44 +0000 (11:16 +0200)] 
util: introduce SQUARE macro

6 years agoreference: fix offset SD to include elapsed time
Miroslav Lichvar [Fri, 17 Aug 2018 06:39:30 +0000 (08:39 +0200)] 
reference: fix offset SD to include elapsed time

This should slow down corrections based on old measurements with large
estimated error in frequency.

6 years agosources: fix combined offset SD to include elapsed time
Miroslav Lichvar [Tue, 21 Aug 2018 10:05:12 +0000 (12:05 +0200)] 
sources: fix combined offset SD to include elapsed time

6 years agosources: combine frequencies by variance instead of skew
Miroslav Lichvar [Fri, 17 Aug 2018 08:46:19 +0000 (10:46 +0200)] 
sources: combine frequencies by variance instead of skew

This seems to slightly improve the stability.

6 years agosources: provide frequency SD to reference update
Miroslav Lichvar [Fri, 17 Aug 2018 06:34:14 +0000 (08:34 +0200)] 
sources: provide frequency SD to reference update

6 years agosourcestats: provide frequency SD in tracking data
Miroslav Lichvar [Fri, 17 Aug 2018 06:01:03 +0000 (08:01 +0200)] 
sourcestats: provide frequency SD in tracking data

6 years agosourcestats: replace constant with macro
Miroslav Lichvar [Fri, 17 Aug 2018 05:57:01 +0000 (07:57 +0200)] 
sourcestats: replace constant with macro

6 years agotest: don't require exit message to be on last line
Miroslav Lichvar [Fri, 17 Aug 2018 15:38:44 +0000 (17:38 +0200)] 
test: don't require exit message to be on last line

This is useful with enabled debug output.

7 years agontp: change maxdelay* info messages to use option names
Miroslav Lichvar [Mon, 13 Aug 2018 10:17:57 +0000 (12:17 +0200)] 
ntp: change maxdelay* info messages to use option names

7 years agotest: improve 101-poll test
Miroslav Lichvar [Fri, 10 Aug 2018 14:46:38 +0000 (16:46 +0200)] 
test: improve 101-poll test

7 years agorefclock: improve error messages
Miroslav Lichvar [Thu, 9 Aug 2018 11:56:56 +0000 (13:56 +0200)] 
refclock: improve error messages

7 years agontp: add options to set minsamples/maxsamples of hwclock
Miroslav Lichvar [Wed, 8 Aug 2018 12:03:35 +0000 (14:03 +0200)] 
ntp: add options to set minsamples/maxsamples of hwclock

7 years agohwclock: add parameters for minimum/maximum number of samples
Miroslav Lichvar [Wed, 8 Aug 2018 11:22:30 +0000 (13:22 +0200)] 
hwclock: add parameters for minimum/maximum number of samples

Allocate the arrays which hold the samples dynamically and limit the
number of dropped samples to not fall below the minimum.

7 years agotest: add 127-filter test
Miroslav Lichvar [Thu, 9 Aug 2018 12:51:18 +0000 (14:51 +0200)] 
test: add 127-filter test

7 years agocmdmon: include filter length in ADD_SERVER/ADD_PEER request
Miroslav Lichvar [Tue, 7 Aug 2018 16:01:16 +0000 (18:01 +0200)] 
cmdmon: include filter length in ADD_SERVER/ADD_PEER request

7 years agontp: add assertion to get_seperation()
Miroslav Lichvar [Wed, 8 Aug 2018 13:56:12 +0000 (15:56 +0200)] 
ntp: add assertion to get_seperation()

7 years agontp: shorten minimum allowed polling interval
Miroslav Lichvar [Wed, 8 Aug 2018 12:52:11 +0000 (14:52 +0200)] 
ntp: shorten minimum allowed polling interval

With the filter option it is useful to collect NTP measurements at
a higher rate.

7 years agontp: add filter option
Miroslav Lichvar [Mon, 6 Aug 2018 16:12:12 +0000 (18:12 +0200)] 
ntp: add filter option

Add an option to use the median filter to reduce noise in measurements
before they are accumulated to sourcestats, similarly to reference
clocks. The option specifies how many samples are reduced to a single
sample.

The filter is intended to be used with very short polling intervals in
local networks where it is acceptable to generate a lot of NTP traffic.

7 years agontp: enable auto burst with very short polling intervals
Miroslav Lichvar [Mon, 6 Aug 2018 11:56:27 +0000 (13:56 +0200)] 
ntp: enable auto burst with very short polling intervals

This fixes commit 5b75d4afefd04bef93d57cc3f087befc1062141e.

7 years agorefclock: split off median filter
Miroslav Lichvar [Fri, 3 Aug 2018 13:15:36 +0000 (15:15 +0200)] 
refclock: split off median filter

Move the implementation of the median filter to a separate file to make
it useful for NTP. Replace some constants with parameters and generalize
the code to work with full NTP samples (including root dispersion/delay,
stratum, and leap).

For refclocks it should give the same results as before.

7 years agouse common structure for NTP samples
Miroslav Lichvar [Wed, 1 Aug 2018 14:28:26 +0000 (16:28 +0200)] 
use common structure for NTP samples

Define a structure for NTP samples and use it to pass samples from
the ntp_core and refclock code to sources and sourcestats.

7 years agosourcestats: don't save stratum for all samples
Miroslav Lichvar [Wed, 1 Aug 2018 14:19:37 +0000 (16:19 +0200)] 
sourcestats: don't save stratum for all samples

Save stratum only from the last accumulated sample as only that is
currently needed.

7 years agosourcestats: track leap status
Miroslav Lichvar [Wed, 1 Aug 2018 14:19:28 +0000 (16:19 +0200)] 
sourcestats: track leap status

This moves the leap status of the last sample from the source instance
to the sourcestats instance in order to make them both accumulate the
same data.

7 years agosys_linux: allow fcntl(F_SETFL) in seccomp filter
Miroslav Lichvar [Fri, 3 Aug 2018 08:39:32 +0000 (10:39 +0200)] 
sys_linux: allow fcntl(F_SETFL) in seccomp filter

This fixes commit 76bed76289575ba1640c02d370ae5304ef8c5fe2.

7 years agoconfigure: fix detection of timepps.h on FreeBSD
Miroslav Lichvar [Fri, 3 Aug 2018 08:08:01 +0000 (10:08 +0200)] 
configure: fix detection of timepps.h on FreeBSD

The header requires inttypes.h to be useful.

7 years agoconfigure: drop detection of stdint.h and inttypes.h
Miroslav Lichvar [Fri, 3 Aug 2018 08:03:07 +0000 (10:03 +0200)] 
configure: drop detection of stdint.h and inttypes.h

The current code uses macros from inttypes.h. There is no point in
detecting and selecting between stdint.h and inttypes.h as the latter is
always needed.

7 years agomemory: add missing include
Miroslav Lichvar [Wed, 1 Aug 2018 16:46:08 +0000 (18:46 +0200)] 
memory: add missing include

7 years agoutil: handle or ignore SIGPIPE signal
Miroslav Lichvar [Wed, 1 Aug 2018 10:20:17 +0000 (12:20 +0200)] 
util: handle or ignore SIGPIPE signal

In chronyc handle SIGPIPE similarly to SIGTERM. In chronyd ignore the
signal to avoid crashing when a TCP socket will be needed (e.g. for
NTS-KE) and will be unexpectedly closed from the other side.

7 years agoutil: handle errors in setting of signal handler as fatal
Miroslav Lichvar [Wed, 1 Aug 2018 09:59:00 +0000 (11:59 +0200)] 
util: handle errors in setting of signal handler as fatal

7 years agosched: allow file handler with multiple events to remove itself
Miroslav Lichvar [Tue, 31 Jul 2018 14:44:43 +0000 (16:44 +0200)] 
sched: allow file handler with multiple events to remove itself

Before dispatching a handler, check if it is still valid. This allows a
handler to remove itself when a descriptor has two different events at
the same time.

7 years agodoc: update chrony.conf man page for recent changes
Miroslav Lichvar [Fri, 22 Jun 2018 10:09:31 +0000 (12:09 +0200)] 
doc: update chrony.conf man page for recent changes

7 years agontp: allow sub-second maxpoll
Miroslav Lichvar [Thu, 21 Jun 2018 15:37:31 +0000 (17:37 +0200)] 
ntp: allow sub-second maxpoll

Remove the maxpoll-specific limit and allow both minpoll and maxpoll to
be set to a negative value.

7 years agontp: restrict use of sub-second polling intervals
Miroslav Lichvar [Thu, 21 Jun 2018 15:29:43 +0000 (17:29 +0200)] 
ntp: restrict use of sub-second polling intervals

When the local polling interval is adjusted between minpoll and maxpoll
to a sub-second value, check if the source is reachable and the minimum
measured delay is 10 milliseconds or less. If it's not, ignore the
maxpoll value and set the interval to 1 second.

This should prevent clients (mis)configured with an extremely short
minpoll/maxpoll from flooding servers on the Internet.

7 years agontp: make burst interval proportional to polling interval
Miroslav Lichvar [Thu, 21 Jun 2018 14:46:30 +0000 (16:46 +0200)] 
ntp: make burst interval proportional to polling interval

If the polling interval is shorter than 8 seconds, set the burst
interval to the 1/4th of the polling interval instead of the 2-second
constant. This should make the burst option and command useful with
very short polling intervals.

7 years agorefclock_sock: downgrade error messages to debug messages
Miroslav Lichvar [Wed, 20 Jun 2018 14:37:57 +0000 (16:37 +0200)] 
refclock_sock: downgrade error messages to debug messages

Turn error messages which are not expected to happen with a correctly
working SOCK client into debug messages.

7 years agofix printf()/scanf() format signedness
Miroslav Lichvar [Wed, 20 Jun 2018 14:28:10 +0000 (16:28 +0200)] 
fix printf()/scanf() format signedness

Fix mismatches between the format and sign of variables passed to
printf() or scanf(), which were found in a Frama-C analysis and gcc
using the -Wformat-signedness option.

7 years agokeys: initialize data used for measuring authentication delay
Miroslav Lichvar [Wed, 20 Jun 2018 12:36:28 +0000 (14:36 +0200)] 
keys: initialize data used for measuring authentication delay

This issue was found in a Frama-C analysis.

7 years agoreference: specify recipient in message when sending email
Miroslav Lichvar [Wed, 20 Jun 2018 11:02:55 +0000 (13:02 +0200)] 
reference: specify recipient in message when sending email

Instead of adding the recipient to the sendmail command line (which is
interpretted by the shell) add a "To" line to the message and run
sendmail with the -t option to read the recipient from the message.

7 years agoreference: terminate string returned by gethostname()
Miroslav Lichvar [Wed, 20 Jun 2018 10:27:59 +0000 (12:27 +0200)] 
reference: terminate string returned by gethostname()

POSIX doesn't require the string to be terminated if it didn't fit in
the buffer.

This issue was found in a Frama-C analysis.

7 years agocheck values returned by gmtime() and localtime()
Miroslav Lichvar [Wed, 20 Jun 2018 10:11:55 +0000 (12:11 +0200)] 
check values returned by gmtime() and localtime()

While it is not expected to happen with any time that can be represented
by the system clock, the functions are allowed to return NULL. Check the
pointer before dereferencing.

This issue was found in a Frama-C analysis.

7 years agoclient: re-work tab-completion to work with libedit 20180525-3.1
Lonnie Abelbeck [Thu, 14 Jun 2018 19:54:42 +0000 (14:54 -0500)] 
client: re-work tab-completion to work with libedit 20180525-3.1

Remove spaces from tab-completion results and now break on a space.
Tested with both readline and editline (libedit)
Incorporated Miroslav's suggestions.

7 years agodoc: fix description of pidfile directive to mention -Q option
Miroslav Lichvar [Thu, 7 Jun 2018 15:53:40 +0000 (17:53 +0200)] 
doc: fix description of pidfile directive to mention -Q option

This fixes commit 778fce4039e1763f9da367a97a53446d28810f1c.

7 years agoexamples: update pidfile in chronyd.service
Miroslav Lichvar [Thu, 7 Jun 2018 15:43:57 +0000 (17:43 +0200)] 
examples: update pidfile in chronyd.service

7 years agoconfigure: move default pidfile to /var/run/chrony
Miroslav Lichvar [Thu, 7 Jun 2018 14:54:59 +0000 (16:54 +0200)] 
configure: move default pidfile to /var/run/chrony

This allows chronyd to remove its pidfile on exit after dropping the
root privileges in order to prevent another chronyd instance from
failing to start, e.g. due to a wrong SELinux label from chronyd -q.

7 years agomain: create directories before writing pidfile
Miroslav Lichvar [Thu, 7 Jun 2018 14:43:59 +0000 (16:43 +0200)] 
main: create directories before writing pidfile

This makes it possible to save pidfile in /var/run/chrony.

7 years agontp: change auto_offline to trigger on failed transmissions
Miroslav Lichvar [Thu, 24 May 2018 15:29:15 +0000 (17:29 +0200)] 
ntp: change auto_offline to trigger on failed transmissions

Instead of counting missing responses, switch to the offline state
immediately when sendmsg() fails.

This makes the option usable with servers and networks that may drop
packets, and the effect will be consistent with the onoffline command.

7 years agoexamples: update NetworkManager dispatcher script
Miroslav Lichvar [Thu, 24 May 2018 15:03:31 +0000 (17:03 +0200)] 
examples: update NetworkManager dispatcher script

Replace most of the code with the new onoffline command.