core: introduce ProtectProc= and ProcSubset= to expose hidepid= and subset= procfs mount options

Kernel 5.8 gained a hidepid= implementation that is truly per procfs,
which allows us to mount a distinct once into every unit, with
individual hidepid= settings. Let's expose this via two new settings:
ProtectProc= (wrapping hidpid=) and ProcSubset= (wrapping subset=).

Replaces: #11670
This commit is contained in:
Lennart Poettering
2020-08-24 20:11:02 +02:00
parent df6b900a1b
commit 4e39995371
12 changed files with 131 additions and 19 deletions
+2
View File
@@ -36,6 +36,8 @@ int main(int argc, char *argv[]) {
.protect_control_groups = true,
.protect_kernel_tunables = true,
.protect_kernel_modules = true,
.protect_proc = PROTECT_PROC_NOACCESS,
.proc_subset = PROC_SUBSET_PID,
};
char *root_directory;