-
b5d1ae14
by Miroslav Lichvar at 2025-03-20T15:55:15+01:00
conf: don't return unused values from parse functions
No need to return success. These functions terminate the process on
errors.
-
2d3c89e1
by Miroslav Lichvar at 2025-03-20T15:55:25+01:00
conf: change parse_null() to accept pointer for consistency
-
2b127b2e
by Miroslav Lichvar at 2025-03-20T15:55:25+01:00
conf: switch other_parse_error() to variable arguments
-
e694ae76
by Miroslav Lichvar at 2025-03-20T15:57:55+01:00
cmdparse: add status for server and local command
Add an enum to describe the error in the parsed directive: missing
argument, invalid option, or invalid value.
Update the error messages in conf.c and client.c.
-
8fd386f2
by Miroslav Lichvar at 2025-03-20T16:04:09+01:00
conf+cmdparse: check sanity of configured integer values
Verify that integer values specified in the configuration are sane:
interval log2 values are between -32 and 32, ports between 0 and 65535,
stratum between 0 and 16, values that should not be negative are not
negative, numbers that specify large intervals in seconds fit in the
32-bit integer, numbers don't have non-digit characters, etc.
-
1b24a66b
by Miroslav Lichvar at 2025-03-20T16:34:33+01:00
conf: improve some error messages
-
75bbccf5
by Miroslav Lichvar at 2025-03-20T16:34:35+01:00
configure: make NTP and ASYNCDNS support nonoptional
Don't allow the NTP support and asynchronous name resolving to be
disabled. pthreads are now a hard requirement.
NTP is the primary task of chrony. This functionality doesn't seem to be
commonly disabled (allowing only refclocks and manual input).
This removes rarely (if ever) used code and simplifies testing.
-
dd873811
by Miroslav Lichvar at 2025-03-20T16:34:35+01:00
logging: try to reopen message log on cyclelogs command
When the cyclelogs command is issued, check if the file specified by the
-l option is still in its place and if not try opening it again. If that
fails (e.g. due to chrony no longer having root privileges), keep the
old file handle to avoid losing log messages.