Commit graph

11 commits

Author SHA1 Message Date
Miroslav Lichvar
1d4690eb64 sys_linux: add syscall filter context for NTS-KE
The NTS-KE helper process will use a more restrictive filter than the
main process.
2020-03-05 16:02:15 +01:00
Miroslav Lichvar
e6848b1e3f sys: specify context for syscall filter
Specify a context to enable different processes using different (more
restrictive) syscall filters.
2020-03-05 16:02:15 +01:00
Miroslav Lichvar
c44346096c sys: add null driver
Add a new clock driver that doesn't actually try to adjust the clock.
It allows chronyd to run without the capability to adjust/set the system
clock, e.g. in some containers. It can be enabled by the -x option.
2017-03-10 16:51:03 +01:00
Miroslav Lichvar
434faeecb8 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>.
2015-09-04 17:56:51 +02:00
Miroslav Lichvar
6402350c83 sys: move getpwnam() call to main.c
Pass uid/gid instead of user name to the root dropping function.
2015-08-10 16:06:39 +02:00
Miroslav Lichvar
e8c5d15690 Remove CVS headers 2011-01-28 12:56:09 +01:00
Miroslav Lichvar
e3234465e2 Clean up system options code
Abort with error message when trying to use unsupported/disabled
system specific option.
2009-11-25 14:37:41 +01:00
Miroslav Lichvar
8e23110aec Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
John Hasler
35e662d810 Add mlockall and SCHED_FIFO support
The attached patch adds support for mlockall() as well as the SCHED_FIFO
real-time scheduler. It should result in reduced (and more consistent)
latency. Usage is documented in all the documents.
2009-02-10 18:02:28 +01:00
Miroslav Lichvar
be42b4eeea Linux capabilities support
Attached is a patch adding a linux capabilities support to chronyd. It
adds -u option which can be used to specify the user which chronyd
should switch to.
2008-11-05 23:50:48 +00:00
Richard P. Curnow
8884034104 Equivalent to V1.19.99.1
This is a verbatim copy of the files at that stage of the repository that was
built from the CVS import.  It allows future development to see a bit of recent
history, but without carrying around the baggage going back to 1997.  If that
is really required, git grafts can be used.
2006-01-19 21:34:28 +00:00