]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
9 years agosys: use timex driver on FreeBSD
Miroslav Lichvar [Tue, 15 Sep 2015 16:43:43 +0000 (18:43 +0200)] 
sys: use timex driver on FreeBSD

Switch from the SunOS adjtime() based driver to the timex driver.
There is no FreeBSD-specific code, so call SYS_Timex_Initialise()
and SYS_Timex_Finalise() directly from sys.c.

9 years agoclean up sysincl.h
Miroslav Lichvar [Tue, 15 Sep 2015 16:42:09 +0000 (18:42 +0200)] 
clean up sysincl.h

9 years agodrop WINNT-specific code
Miroslav Lichvar [Tue, 15 Sep 2015 16:12:32 +0000 (18:12 +0200)] 
drop WINNT-specific code

This was never really supported and it would probably require a lot of
work to get a usable chronyd in Cygwin. Remove all WINNT-specific code.

9 years agosys: don't allow empty SYS_Initialise()/SYS_Finalise()
Miroslav Lichvar [Tue, 15 Sep 2015 15:54:05 +0000 (17:54 +0200)] 
sys: don't allow empty SYS_Initialise()/SYS_Finalise()

Require one system-specific macro to be defined to always call an
initialization/finalization function.

9 years agosys: move DRIFT_REMOVAL_INTERVAL definition
Miroslav Lichvar [Tue, 15 Sep 2015 15:38:58 +0000 (17:38 +0200)] 
sys: move DRIFT_REMOVAL_INTERVAL definition

In the SunOS and Solaris drivers DRIFT_REMOVAL_INTERVAL needs to be
defined before it's used. This was broken in commit
b6a27df5b9be0f07f151c8fba311cb7eadb2b13e.

9 years agosys_netbsd: use timex driver
Miroslav Lichvar [Tue, 15 Sep 2015 13:44:34 +0000 (15:44 +0200)] 
sys_netbsd: use timex driver

Remove the driver functions based on adjtime() and switch to the new
timex driver, which is based on ntp_adjtime(). This allows chronyd to
control the kernel frequency, adjust the offset with sub-microsecond
accuracy, and set the kernel leap and sync status. A drawback is that
the maximum slew rate is now limited by the 500 ppm maximum frequency
offset, while adjtime() on NetBSD slewed by up to 5000 ppm.

9 years agosys_linux: use timex driver
Miroslav Lichvar [Tue, 15 Sep 2015 13:24:28 +0000 (15:24 +0200)] 
sys_linux: use timex driver

Remove functions that are included in the new timex driver. Keep only
functions that have extended functionality, i.e. read and set the
frequency using the timex tick field and apply step offset with
ADJ_SETOFFSET.

Merge the code from wrap_adjtimex.c that is still needed with
sys_linux.c and remove the file.

9 years agosys: add generic timex driver
Miroslav Lichvar [Tue, 15 Sep 2015 13:03:37 +0000 (15:03 +0200)] 
sys: add generic timex driver

This is based on sys_linux.c and wrap_adjtimex.c. It's intended for all
systems that support the adjtimex() or ntp_adjtime() system call. The
driver functions can be replaced with extended system-specific versions
(e.g. to control the frequency with the tick field on Linux).

9 years agotest: add tests for system adjtime() and ntp_adjtime()
Miroslav Lichvar [Thu, 10 Sep 2015 13:34:56 +0000 (15:34 +0200)] 
test: add tests for system adjtime() and ntp_adjtime()

Include a test program to determine how the adjtime() implementation
behaves. Check the range of supported offset, support for readonly
operation, and slew rate with different update intervals and offsets.

Also, add a test for ntp_adjtime() to check what frequency range it
supports.

9 years agogit: use absolute paths in .gitignore
Miroslav Lichvar [Thu, 10 Sep 2015 13:32:58 +0000 (15:32 +0200)] 
git: use absolute paths in .gitignore

9 years agosys_linux: allow uname in seccomp filter
Miroslav Lichvar [Mon, 14 Sep 2015 07:16:33 +0000 (09:16 +0200)] 
sys_linux: allow uname in seccomp filter

It may be called from res_init() apparently.

9 years agoutil: print expected uid/gid in UTI_CheckDirPermissions()
Miroslav Lichvar [Wed, 9 Sep 2015 15:05:51 +0000 (17:05 +0200)] 
util: print expected uid/gid in UTI_CheckDirPermissions()

9 years agosys_linux: allow setting IP_FREEBIND option in seccomp filter
Miroslav Lichvar [Wed, 9 Sep 2015 14:36:48 +0000 (16:36 +0200)] 
sys_linux: allow setting IP_FREEBIND option in seccomp filter

This is needed when chronyd is started with no allow directive, but the
NTP server socket is opened by the allow command later.

9 years agotest: extend compilation/001-features
Miroslav Lichvar [Wed, 9 Sep 2015 11:50:32 +0000 (13:50 +0200)] 
test: extend compilation/001-features

9 years agostubs: add CAM_OpenUnixSocket()
Miroslav Lichvar [Wed, 9 Sep 2015 11:48:53 +0000 (13:48 +0200)] 
stubs: add CAM_OpenUnixSocket()

It is needed to build with disabled cmdmon.

9 years agoconfigure: add --disable-scfilter option
Miroslav Lichvar [Wed, 9 Sep 2015 11:37:56 +0000 (13:37 +0200)] 
configure: add --disable-scfilter option

9 years agoconfigure: update chronyc feature list
Miroslav Lichvar [Wed, 9 Sep 2015 13:23:44 +0000 (15:23 +0200)] 
configure: update chronyc feature list

9 years agodoc: update section on isolated networks
Miroslav Lichvar [Wed, 9 Sep 2015 14:30:17 +0000 (16:30 +0200)] 
doc: update section on isolated networks

Since the NTPv4 update, the detection of synchronization loops based on
the refid prevents a server to initialize its clock from its clients
after restart. Remove that part from the recommended configuration.
Also, mention the time smoothing feature.

9 years agodoc: update for recent changes
Miroslav Lichvar [Tue, 8 Sep 2015 15:31:38 +0000 (17:31 +0200)] 
doc: update for recent changes

9 years agosys_linux: add support for seccomp filters
Miroslav Lichvar [Mon, 16 Jun 2014 14:21:25 +0000 (16:21 +0200)] 
sys_linux: add support for seccomp filters

The Linux secure computing (seccomp) facility allows a process to
install a filter in the kernel that will allow only specific system
calls to be made. The process is killed when trying to make other system
calls. This is useful to reduce the kernel attack surface and possibly
prevent kernel exploits when the process is compromised.

Use the libseccomp library to add rules and load the filter into the
kernel. Keep a list of system calls that are always allowed after
chronyd is initialized. Restrict arguments that may be passed to the
socket(), setsockopt(), fcntl(), and ioctl() system calls. Arguments
to socketcall(), which is used on some architectures as a multiplexer
instead of separate socket system calls, are not restricted for now.
The mailonchange directive is not allowed as it calls sendmail.

Calls made by the libraries that chronyd is using have to be covered
too. It's difficult to determine which system calls they need as it may
change after an upgrade and it may depend on their configuration (e.g.
resolver in libc). There are also differences between architectures. It
can all break very easily and is therefore disabled by default. It can
be enabled with the new -F option.

This is based on a patch from Andrew Griffiths <agriffit@redhat.com>.

9 years agomain: install signal handler sooner
Miroslav Lichvar [Fri, 4 Sep 2015 10:19:44 +0000 (12:19 +0200)] 
main: install signal handler sooner

9 years agodoc: fix typo in chronyd man page
Miroslav Lichvar [Fri, 4 Sep 2015 15:02:26 +0000 (17:02 +0200)] 
doc: fix typo in chronyd man page

9 years agortc: fix setting time from driftfile when RTC reading fails
Miroslav Lichvar [Thu, 3 Sep 2015 09:30:09 +0000 (11:30 +0200)] 
rtc: fix setting time from driftfile when RTC reading fails

Fix RTC_Linux_TimePreInit() to return 0 when the RTC device can be
opened, but reading its time fails to at least have the time restored
from the driftfile.

9 years agosys_macosx: reset drift removal timer after spike in offset_sd
Bryan Christianson [Fri, 28 Aug 2015 11:21:01 +0000 (23:21 +1200)] 
sys_macosx: reset drift removal timer after spike in offset_sd

When a large spike occurs in offset_sd the drift removal interval can be
set to an excessively long time, although what ever event caused the
perturbation has passed. At the next set_sync_status() we now compare
the expected drift removal interval with that currently in effect. If
they are significantly different, the current timer is cancelled and new
cycle started using the new drift removal interval.

9 years agosys_linux: always call TMX_SetLeap() in set_leap()
Miroslav Lichvar [Wed, 26 Aug 2015 12:45:36 +0000 (14:45 +0200)] 
sys_linux: always call TMX_SetLeap() in set_leap()

The optimization avoiding unnecessary setting of the kernel leap status
can cause a problem when something outside chronyd sets the status to
the new expected value. There will be no TMX_SetLeap() call which would
update the saved status and the kernel status will be overwritten with
the old (incorrect) value in a later TMX_*() call.

Always call TMX_SetLeap() to save the new value and for the log message
selection just check if a leap second has been applied.

9 years agoreference: call LCL_SetSystemLeap() only on leap changes
Miroslav Lichvar [Wed, 26 Aug 2015 12:42:14 +0000 (14:42 +0200)] 
reference: call LCL_SetSystemLeap() only on leap changes

9 years agoexamples: update for removed cmdmon authentication
Miroslav Lichvar [Wed, 26 Aug 2015 07:49:19 +0000 (09:49 +0200)] 
examples: update for removed cmdmon authentication

9 years agosys_macosx: add option to run chronyd as real-time process
Bryan Christianson [Mon, 24 Aug 2015 20:32:14 +0000 (08:32 +1200)] 
sys_macosx: add option to run chronyd as real-time process

Adds option -P to chronyd on MacOS X which can be used to enable the
thread time constraint scheduling policy. This near real-time scheduling
policy removes a 1usec bias from the 'System time' offset.

9 years agosources: add option to limit selection by root distance
Miroslav Lichvar [Tue, 25 Aug 2015 14:27:36 +0000 (16:27 +0200)] 
sources: add option to limit selection by root distance

Add maxdistance directive to set the maximum root distance the sources
are allowed to have to be selected. This is useful to reject NTPv4
sources that are no longer synchronized and report large dispersion.
The default value is 3 seconds.

9 years agoconfigure: add new options to disable dropping root privileges
Miroslav Lichvar [Tue, 25 Aug 2015 12:09:06 +0000 (14:09 +0200)] 
configure: add new options to disable dropping root privileges

9 years agosys_netbsd: allow running without root privileges
Miroslav Lichvar [Tue, 25 Aug 2015 10:15:58 +0000 (12:15 +0200)] 
sys_netbsd: allow running without root privileges

On NetBSD programs with write access to /dev/clockctl can adjust or set
the system clock without the root privileges. Add a function to drop the
privileges and check if the process has write access to the device to
get a more descriptive error message when the chrony uid/gid doesn't
match the owner of the device.

9 years agomain: open cmdmon and NTP internet sockets before dropping root
Miroslav Lichvar [Mon, 24 Aug 2015 15:15:31 +0000 (17:15 +0200)] 
main: open cmdmon and NTP internet sockets before dropping root

Call the CAM, NIO, NCR initialization functions and setup the access
restrictions before root is dropped. This will be needed on NetBSD,
where it's not possible to bind sockets to privileged ports without the
root privileges. Split the creation of the Unix domain command socket
from the CAM initialization to keep the chrony user as the owner of the
socket.

9 years agoconf: allow wildcard patterns in include directive
Miroslav Lichvar [Mon, 24 Aug 2015 13:08:39 +0000 (15:08 +0200)] 
conf: allow wildcard patterns in include directive

Use glob() to match and read multiple configuration files with one
include directive.

9 years agoconf: extend logging in CNF_ReadFile()
Miroslav Lichvar [Mon, 24 Aug 2015 12:57:39 +0000 (14:57 +0200)] 
conf: extend logging in CNF_ReadFile()

9 years agosys_linux: remove unused variables
Miroslav Lichvar [Mon, 24 Aug 2015 11:25:39 +0000 (13:25 +0200)] 
sys_linux: remove unused variables

9 years agocmdmon: update candm.h
Miroslav Lichvar [Thu, 20 Aug 2015 15:21:12 +0000 (17:21 +0200)] 
cmdmon: update candm.h

Remove the auth fields in the command request/reply and replace the
token and utoken fields with padding.

9 years agokeys: remove support for command key
Miroslav Lichvar [Thu, 20 Aug 2015 14:43:12 +0000 (16:43 +0200)] 
keys: remove support for command key

Without the cmdmon authentication, there is no need for command keys.

9 years agoclient: remove authentication support
Miroslav Lichvar [Thu, 20 Aug 2015 14:29:07 +0000 (16:29 +0200)] 
client: remove authentication support

Follow the removal of the server authentication support and remove also
the client support. The -a and -f options are now silently ignored to
not break scripts. The authhash and password commands print a warning,
but they don't return an error.

9 years agocmdmon: remove authentication support
Miroslav Lichvar [Mon, 13 Apr 2015 08:44:15 +0000 (10:44 +0200)] 
cmdmon: remove authentication support

With the new support for cmdmon over Unix domain sockets, authentication
is no longer necessary to authorize a client running on localhost with
the permissions of the root or chrony user/group. Remove the cmdmon
authentication support to simplify the code and significantly reduce the
attack surface of the protocol.

Only monitoring commands are now allowed remotely. Users that need to
configure chronyd remotely or locally without root/chrony permissions
are advised to use ssh and/or sudo.

9 years agocmdmon: allow unauthenticated commands from Unix domain socket
Miroslav Lichvar [Wed, 19 Aug 2015 16:33:18 +0000 (18:33 +0200)] 
cmdmon: allow unauthenticated commands from Unix domain socket

Allow all commands received from the Unix domain command socket (which
is accessible only by the root and chrony user/group), even when they
are not authenticated with the command key.

9 years agoclient: connect to Unix domain socket by default
Miroslav Lichvar [Wed, 19 Aug 2015 16:16:22 +0000 (18:16 +0200)] 
client: connect to Unix domain socket by default

The default value of the -h option is now
/var/run/chrony/chronyd.sock,127.0.0.1,::1.

9 years agoconfigure: add option to set default location of Unix domain sockets
Miroslav Lichvar [Wed, 19 Aug 2015 15:55:42 +0000 (17:55 +0200)] 
configure: add option to set default location of Unix domain sockets

9 years agoclient: reconnect with multiple addresses
Miroslav Lichvar [Wed, 19 Aug 2015 08:19:13 +0000 (10:19 +0200)] 
client: reconnect with multiple addresses

Allow multiple hostnames/addresses separated by comma to be specified
with the -h option. Hostnames are resolved to up to 16 addresses. When
connecting to an address fails or no reply is received, try the next
address in the list.

Set the default value for the -h option to 127.0.0.1,::1.

9 years agoclient: allow connecting to Unix domain sockets
Miroslav Lichvar [Tue, 18 Aug 2015 14:06:05 +0000 (16:06 +0200)] 
client: allow connecting to Unix domain sockets

If the specified hostname starts with /, consider it to be the path of
the chronyd Unix domain command socket. Create the client socket in the
same directory as the server socket (which is not accessible by others)
and change its permission to 0666 to allow chronyd running without root
privileges to send a reply. Remove the socket on exit.

9 years agoclient: connect socket
Miroslav Lichvar [Tue, 18 Aug 2015 11:35:18 +0000 (13:35 +0200)] 
client: connect socket

Call connect() on the socket to set the remote address and switch from
sendto()/recvfrom() to send()/recv(). Setting the IP_RECVERR option no
longer seems to be necessary in order to get ECONNREFUSED errors.

9 years agoclient: add -d option to print debug messages
Miroslav Lichvar [Tue, 18 Aug 2015 11:04:09 +0000 (13:04 +0200)] 
client: add -d option to print debug messages

9 years agoclient: convert disabled printf() calls to debug messages
Miroslav Lichvar [Tue, 18 Aug 2015 10:56:21 +0000 (12:56 +0200)] 
client: convert disabled printf() calls to debug messages

9 years agoclient: use LOG macro for error messages
Miroslav Lichvar [Wed, 5 Aug 2015 14:13:06 +0000 (16:13 +0200)] 
client: use LOG macro for error messages

9 years agocmdmon: print path of Unix command socket in debug messages
Miroslav Lichvar [Wed, 19 Aug 2015 14:14:19 +0000 (16:14 +0200)] 
cmdmon: print path of Unix command socket in debug messages

9 years agocmdmon: fix handling of packets from unbound Unix sockets
Miroslav Lichvar [Wed, 19 Aug 2015 13:52:36 +0000 (15:52 +0200)] 
cmdmon: fix handling of packets from unbound Unix sockets

When a packet is received from an unbound Unix domain socket, recvfrom()
may return with zero addrlen.

9 years agocontrib: add Mac OS X support files
Bryan Christianson [Tue, 18 Aug 2015 21:31:45 +0000 (09:31 +1200)] 
contrib: add Mac OS X support files

launchd plist files for chronyd and logrotation.
shell script for logrotation
README file with detailed installation instructions

9 years agosys_macosx: make drift removal interval dynamic
Bryan Christianson [Tue, 18 Aug 2015 08:24:27 +0000 (20:24 +1200)] 
sys_macosx: make drift removal interval dynamic

Adjust the drift removal interval based on the observed offset_sd.
A newly calculated interval goes into effect after the current drift
removal has completed. When offset_sd is high, the interval is increased
resulting in fewer wakeups to adjust the drift offset. At lower values
of offset_sd the drift removal adjustment interval is pinned to 0.5
seconds. The predicted error applied at the start of an adjustment is
based on the remaining time of the drift removal that is currently in
effect. Default drift removal adjustment interval is 4.0 seconds (was
1.0). If not synchronised set interval to  maximum of default interval
and current interval. Clamp elapsed drift removal time to
[0, current_drift_removal_interval] to cover clock stepping.

9 years agoutil: set uid/gid of created directory even when zero
Miroslav Lichvar [Thu, 13 Aug 2015 15:04:10 +0000 (17:04 +0200)] 
util: set uid/gid of created directory even when zero

Call chown() in create_dir() even when the specified uid/gid is zero.
This is needed on BSD systems, where directories are created with gid
of the parent directory.

10 years agosys: include predicted drift in adjtime() offset
Miroslav Lichvar [Wed, 12 Aug 2015 13:48:13 +0000 (15:48 +0200)] 
sys: include predicted drift in adjtime() offset

In drivers with periodic drift removal include in the adjustment also a
prediction of the error gained in half of the interval to move the mean
offset of the clock closer to zero. E.g. offset of a stable clock
drifting by 10 ppm should now be closer to 0 +/- 5 microseconds instead
of 5 +/- 5 microseconds.

10 years agosys: define NETBSD macro on NetBSD
Miroslav Lichvar [Mon, 10 Aug 2015 15:32:34 +0000 (17:32 +0200)] 
sys: define NETBSD macro on NetBSD

10 years agoconf: create directory for Unix domain command socket
Miroslav Lichvar [Tue, 11 Aug 2015 15:41:02 +0000 (17:41 +0200)] 
conf: create directory for Unix domain command socket

Try to create the directory where will be the Unix domain command socket
bound to allow starting with empty /var/run. Check the permissions and
owner/group in case the directory already existed. It MUST NOT be
accessible by others as permissions on Unix domain sockets are ignored
on some systems (e.g. Solaris).

10 years agoconf: create directories before dropping root
Miroslav Lichvar [Mon, 10 Aug 2015 15:02:12 +0000 (17:02 +0200)] 
conf: create directories before dropping root

Create logdir and dumpdir before dropping root. Set their uid/gid to the
user chronyd will switch to. This allows chronyd to create the
directories in a directory where the user won't have write permissions
(e.g. /var/lib).

10 years agomain: always call getpwnam()
Miroslav Lichvar [Mon, 10 Aug 2015 14:24:45 +0000 (16:24 +0200)] 
main: always call getpwnam()

Don't hardcode root as the user with zero uid/gid.

10 years agosys: move getpwnam() call to main.c
Miroslav Lichvar [Mon, 10 Aug 2015 13:53:36 +0000 (15:53 +0200)] 
sys: move getpwnam() call to main.c

Pass uid/gid instead of user name to the root dropping function.

10 years agoutil: add mode, uid, gid parameters to UTI_CreateDirAndParents()
Miroslav Lichvar [Mon, 10 Aug 2015 12:56:17 +0000 (14:56 +0200)] 
util: add mode, uid, gid parameters to UTI_CreateDirAndParents()

10 years agoutil: don't try to create current directory
Miroslav Lichvar [Wed, 5 Aug 2015 14:53:02 +0000 (16:53 +0200)] 
util: don't try to create current directory

This prevents error messages when running chronyd -d/-q/-Q with default
logdir in a directory chronyd is not allowed do access after dropping
the root privileges.

10 years agomove mkdirpp code to util.c
Miroslav Lichvar [Wed, 5 Aug 2015 14:30:20 +0000 (16:30 +0200)] 
move mkdirpp code to util.c

10 years agoclient: check if memory allocation fails
Miroslav Lichvar [Wed, 5 Aug 2015 13:47:00 +0000 (15:47 +0200)] 
client: check if memory allocation fails

10 years agoclient: add logging function to allow linking with memory.o
Miroslav Lichvar [Wed, 5 Aug 2015 13:43:39 +0000 (15:43 +0200)] 
client: add logging function to allow linking with memory.o

10 years agodoc: update FAQ
Miroslav Lichvar [Tue, 4 Aug 2015 15:23:27 +0000 (17:23 +0200)] 
doc: update FAQ

10 years agosys: add drift removal to Mac OS X driver
Bryan Christianson [Wed, 29 Jul 2015 21:50:26 +0000 (09:50 +1200)] 
sys: add drift removal to Mac OS X driver

The darwin kernel implementation of adjtime() does not require the
adjustment to be aligned to a tickadj boundary, and we can apply
adjustments to the nearest microsecond. Rounding is accounted for by
adding any rounding errors back into the offset.

10 years agocmdmon: listen on Unix domain socket
Miroslav Lichvar [Tue, 28 Jul 2015 13:29:30 +0000 (15:29 +0200)] 
cmdmon: listen on Unix domain socket

In addition to the IPv4/IPv6 command sockets, create also a Unix domain
socket to process cmdmon requests. For now, there is no difference for
authorized commands, packets from all sockets need to be authenticated.

The default path of the socket is /var/run/chrony/chronyd.sock. It can
be configured with the bindcmdaddress directive with an address starting
with /.

10 years agoclientlog: refactor CLG_Log*Access functions a bit
Miroslav Lichvar [Tue, 28 Jul 2015 12:44:25 +0000 (14:44 +0200)] 
clientlog: refactor CLG_Log*Access functions a bit

10 years agoclientlog: allow unspecified address in CLG_Log*Access functions
Miroslav Lichvar [Tue, 28 Jul 2015 12:29:29 +0000 (14:29 +0200)] 
clientlog: allow unspecified address in CLG_Log*Access functions

10 years agoutil: add function to get sockaddr family name
Miroslav Lichvar [Tue, 28 Jul 2015 11:03:23 +0000 (13:03 +0200)] 
util: add function to get sockaddr family name

10 years agoclient: handle signals
Miroslav Lichvar [Mon, 27 Jul 2015 12:46:50 +0000 (14:46 +0200)] 
client: handle signals

Add a signal handler and rework the code to go through close_io() even
when terminated by a signal. This will allow chronyc to remove Unix
domain sockets on exit.

10 years agoutil: use sigaction() to set signal handler
Miroslav Lichvar [Mon, 27 Jul 2015 12:41:14 +0000 (14:41 +0200)] 
util: use sigaction() to set signal handler

10 years agomain: move signal handler setting to util.c
Miroslav Lichvar [Mon, 27 Jul 2015 12:27:41 +0000 (14:27 +0200)] 
main: move signal handler setting to util.c

10 years agocmdmon: add debug messages for receiving/sending packets
Miroslav Lichvar [Fri, 24 Jul 2015 13:19:31 +0000 (15:19 +0200)] 
cmdmon: add debug messages for receiving/sending packets

10 years agoutil: remove INLINE_UTILITIES support
Miroslav Lichvar [Mon, 27 Jul 2015 11:24:12 +0000 (13:24 +0200)] 
util: remove INLINE_UTILITIES support

10 years agoremove getdate.c from repository
Miroslav Lichvar [Mon, 27 Jul 2015 14:30:29 +0000 (16:30 +0200)] 
remove getdate.c from repository

Building from repository now requires installed bison, but released
tarballs will still include a generated getdate.c.

10 years agoinclude config.h in all compiled files
Miroslav Lichvar [Mon, 27 Jul 2015 14:20:58 +0000 (16:20 +0200)] 
include config.h in all compiled files

After running configure script (new config.h written), all objects
should be recompiled.

10 years agosys: add new log message for kernel status reset after leap second
Miroslav Lichvar [Mon, 27 Jul 2015 10:24:13 +0000 (12:24 +0200)] 
sys: add new log message for kernel status reset after leap second

When a leap second is applied by the kernel, it doesn't actually clear
the STA_INS|STA_DEL bits from the status word, but the state returned
by ntp_adjtime()/adjtimex() is TIME_WAIT until the application clears
the bits.

Add "System clock status reset after leap second" log message for this
case.

10 years agoutil: fix rounding of negative numbers in UTI_DoubleToTimeval()
Bryan Christianson [Thu, 23 Jul 2015 11:59:31 +0000 (23:59 +1200)] 
util: fix rounding of negative numbers in UTI_DoubleToTimeval()

10 years agoutil: fix UTI_Log2ToDouble() for maximum/minimum exponent
Miroslav Lichvar [Thu, 23 Jul 2015 09:44:00 +0000 (11:44 +0200)] 
util: fix UTI_Log2ToDouble() for maximum/minimum exponent

10 years agoconfigure: replace echo -n with printf
Miroslav Lichvar [Thu, 23 Jul 2015 09:23:36 +0000 (11:23 +0200)] 
configure: replace echo -n with printf

POSIX doesn't require echo to support -n.

10 years agomake_release: don't package chrony.txt
Miroslav Lichvar [Wed, 22 Jul 2015 16:14:40 +0000 (18:14 +0200)] 
make_release: don't package chrony.txt

10 years agomakefile: install chrony.txt in install-doc only
Miroslav Lichvar [Wed, 22 Jul 2015 15:42:42 +0000 (17:42 +0200)] 
makefile: install chrony.txt in install-doc only

Don't install chrony.txt in make install to avoid dependency on makeinfo
since chrony.texi is prepared by configure to set the default paths in
the documentation.

10 years agomakefile: don't install COPYING and README
Miroslav Lichvar [Wed, 22 Jul 2015 15:38:00 +0000 (17:38 +0200)] 
makefile: don't install COPYING and README

10 years agodoc: update NEWS 2.1.1
Miroslav Lichvar [Tue, 23 Jun 2015 13:07:59 +0000 (15:07 +0200)] 
doc: update NEWS

10 years agosys: fix clock stepping by integer number of seconds on Linux
Miroslav Lichvar [Tue, 23 Jun 2015 12:48:31 +0000 (14:48 +0200)] 
sys: fix clock stepping by integer number of seconds on Linux

The kernel requires in the ADJ_SETOFFSET | ADJ_NANO mode that the
timex.time.tv_usec value is smaller than 10^9 nanosecond, which wasn't
the case with a negative integer offset (e.g. inserted leap second).

10 years agodoc: update NEWS 2.1
Miroslav Lichvar [Mon, 22 Jun 2015 09:21:48 +0000 (11:21 +0200)] 
doc: update NEWS

10 years agontp: use specific reference ID when smoothing served time
Miroslav Lichvar [Mon, 22 Jun 2015 09:09:31 +0000 (11:09 +0200)] 
ntp: use specific reference ID when smoothing served time

Set refid in server/broadcast packets to 127.127.1.255 when a time
smoothing offset is applied to the timestamps. This allows the clients
and administrators to detect that the server is not serving its best
estimate of the true time.

10 years agontp: remove unnecessary casting
Miroslav Lichvar [Mon, 22 Jun 2015 09:07:53 +0000 (11:07 +0200)] 
ntp: remove unnecessary casting

10 years agoreference: move definition of special refids to ntp.h
Miroslav Lichvar [Mon, 22 Jun 2015 07:13:15 +0000 (09:13 +0200)] 
reference: move definition of special refids to ntp.h

10 years agotest: require latest clknetsim
Miroslav Lichvar [Fri, 19 Jun 2015 10:47:25 +0000 (12:47 +0200)] 
test: require latest clknetsim

10 years agodoc: update leapsecmode and smoothtime descriptions
Miroslav Lichvar [Thu, 18 Jun 2015 16:07:34 +0000 (18:07 +0200)] 
doc: update leapsecmode and smoothtime descriptions

10 years agodoc: add Mac OS X to supported platforms
Miroslav Lichvar [Thu, 18 Jun 2015 14:16:03 +0000 (16:16 +0200)] 
doc: add Mac OS X to supported platforms

10 years agoupdate copyright years
Miroslav Lichvar [Thu, 18 Jun 2015 13:30:22 +0000 (15:30 +0200)] 
update copyright years

10 years agodoc: refer to authhash command in password command description
Miroslav Lichvar [Wed, 17 Jun 2015 16:30:10 +0000 (18:30 +0200)] 
doc: refer to authhash command in password command description

10 years agodoc: convert FAQ to AsciiDoc and update it
Miroslav Lichvar [Wed, 17 Jun 2015 15:57:52 +0000 (17:57 +0200)] 
doc: convert FAQ to AsciiDoc and update it

It's now in a separate file again.

10 years agosys: MacOS X driver ported from NetBSD
Bryan Christianson [Fri, 12 Jun 2015 19:56:39 +0000 (07:56 +1200)] 
sys: MacOS X driver ported from NetBSD

10 years agontp: add debug message to print number of resolved addresses
Miroslav Lichvar [Mon, 15 Jun 2015 11:03:11 +0000 (13:03 +0200)] 
ntp: add debug message to print number of resolved addresses

10 years agoupdate NEWS 2.1-pre1
Miroslav Lichvar [Wed, 10 Jun 2015 12:44:54 +0000 (14:44 +0200)] 
update NEWS

10 years agocmdmon: reply with STT_INVALID on invalid option in handle_manual()
Miroslav Lichvar [Tue, 9 Jun 2015 15:05:15 +0000 (17:05 +0200)] 
cmdmon: reply with STT_INVALID on invalid option in handle_manual()