451672e890
There are three ways to run chronyd: - start as root, and continue running as root; - start as root, then setuid() to a non-root user via either a command line option or a configuration directive; - start as root, and setuid() to a build-time specified non-root user. Currently, the first situation is used by Buildroot, which does not follow security best practices of dropping elevated privileges for daemon at runtime when that is possible. We switch to the third situation, where a compile-time default non-root user is then used at runtime to drop privileges, with libcap used to keep the capabilities required to call the appropriate syscalls to adjust the system time (typically, CAP_SYS_TIME to call adjtimex() or clock_settime() et al.). This means that libcap is now a mandatory dependency. To be noted: users who previously had configured their systems to run chronyd as non root, would have done so with either the command-line option (`-u`), or the configuration directive (`user`). Those take precedence over the compile-time default, so this should not break their systems (presumably, they also run as the `chrony` user). They would also have taken care to run chronyc as the appropriate user to manipulate chronyd at runtime via the UNIX socket. For those who were running chronyd as root, this does not change either: the functionality is unchanged, and they were running chronyc as root, which should still be capable of manipulating chronyd via its UNIX socket. Take that opportunity to brine chrony's Config.in to current coding style: enclose sub-option in an if-endif block. Signed-off-by: James Kent <james.kent@orchestrated-technology.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> |
||
---|---|---|
.. | ||
chrony.hash | ||
chrony.mk | ||
chrony.service | ||
Config.in | ||
S49chrony |