mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-03-11 00:59:38 -04:00
sys: add OpenBSD support
Add OpenBSD support, including pledge(2) support by implementing SYS_EnableSystemCallFilter(). This commit depends on the addition of AdjustFreq() privops and the addtion of invoking SYS_EnableSystemCallFilter() from PRV_StartHelper(). Only system call filter levels on/off' are supported. Setting level to 0 disables the filter and setting it to 1 enables it. Update the documentation to reflect that OpenBSD supports: - the SCHED_FIFO real-time scheduler (option -P) - locking chronyd into memory (option -m) - reload sample history of servers and ref clocks (option -r) - forking into two process when run as non-root user (option -u) - maxdrift/maxslewrate of 100000.
This commit is contained in:
committed by
Miroslav Lichvar
parent
9a57ef8dbf
commit
4ddc6b334d
@@ -8,7 +8,21 @@ check_chronyd_features SCFILTER || test_skip "SCFILTER support disabled"
|
||||
|
||||
test_start "system call filter in destructive tests"
|
||||
|
||||
for level in 1 2 -1 -2; do
|
||||
os_name="$(uname -s)"
|
||||
case $os_name in
|
||||
OpenBSD)
|
||||
supported_levels=1
|
||||
;;
|
||||
Linux)
|
||||
supported_levels="1 2 -1 -2"
|
||||
;;
|
||||
*)
|
||||
test_message 1 1 "unsupported OS $os_name"
|
||||
test_fail
|
||||
;;
|
||||
esac
|
||||
|
||||
for level in $supported_levels; do
|
||||
test_message 1 1 "level $level:"
|
||||
for test in 1[0-8][0-9]-*[^_]; do
|
||||
test_message 2 0 "$test"
|
||||
|
||||
Reference in New Issue
Block a user