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:
Thomas Kupper
2026-02-11 07:53:41 +01:00
committed by Miroslav Lichvar
parent cda67351ae
commit fd60dabde7
6 changed files with 15 additions and 5 deletions

1
sys.h
View File

@@ -38,6 +38,7 @@ extern void SYS_Finalise(void);
typedef enum {
SYS_MAIN_PROCESS,
SYS_NTSKE_HELPER,
SYS_PRIVOPS_HELPER,
} SYS_ProcessContext;
/* Switch to the specified user and group in given context */