mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-03-11 09:09:40 -04:00
privops: enable system call filter
In preparation of OpenBSD support, add SYS_EnableSystemCallFilter() call to PRV_StartHelper(). In OpenBSD the privops helper will use a system call filter (pledge(2)), whereas in Linux the privops helper doesn't use any system call filter at the moment. Modify Unit test ntp_sources call to PRV_Initialise() with parameter scfilter_level set to 0.
This commit is contained in:
committed by
Miroslav Lichvar
parent
cda67351ae
commit
fd60dabde7
@@ -658,6 +658,9 @@ SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context)
|
||||
modules are installed and enabled on the system). */
|
||||
if (default_action != SCMP_ACT_ALLOW)
|
||||
PRV_StartHelper();
|
||||
} else if (context == SYS_PRIVOPS_HELPER) {
|
||||
/* The privops helper on Linux doesn't have any filter loaded */
|
||||
return;
|
||||
}
|
||||
|
||||
ctx = seccomp_init(default_action);
|
||||
|
||||
Reference in New Issue
Block a user