]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/execute.c
core: use LSM BPF functions to implement RestrictFileSystems=
authorIago Lopez Galeiras <iagol@microsoft.com>
Tue, 5 Oct 2021 11:18:49 +0000 (13:18 +0200)
committerIago Lopez Galeiras <iagol@microsoft.com>
Wed, 6 Oct 2021 08:52:14 +0000 (10:52 +0200)
commitb1994387d3cb50b212fc4815941a8ff40d60cd85
treefef8dae9681c45cd38c86a33d88499bf43875814
parent184b4f78cfbded54a6e06bbe1152256c204a7a73
core: use LSM BPF functions to implement RestrictFileSystems=

It attaches the LSM BPF program when the system manager starts up.

It populates the hash of maps BPF map when services that have
RestrictFileSystems= set start.

It cleans up the hash of maps when the unit cgroup is pruned.

To pass the file descriptor of the BPF map we add it to the keep_fds
array.
src/basic/cgroup-util.h
src/core/cgroup.c
src/core/cgroup.h
src/core/execute.c
src/core/execute.h
src/core/main.c
src/core/manager.c