summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-03-29 22:07:22 +0200
committerLennart Poettering <lennart@poettering.net>2023-04-13 06:44:27 +0200
commitb9c1883a9cd9b5126fe648f3e198143dc19a222d (patch)
treef31bf560425d33c0d6933b20fe724e11942d6206 /src/core/load-fragment.h
parentc25fac9a17b95271bb6f8d967d33c5a9aa9e4bc9 (diff)
downloadsystemd-b9c1883a9cd9b5126fe648f3e198143dc19a222d.tar.gz
service: add ability to pin fd store
Oftentimes it is useful to allow the per-service fd store to survive longer than for a restart. This is useful in various scenarios: 1. An fd to some security relevant object needs to be stashed somewhere, that should not be cleaned automatically, because the security enforcement would be dropped then. 2. A user namespace fd should be allocated on first invocation and be kept around until the user logs out (i.e. systemd --user ends), รก la #16328 (This does not implement what #16318 asks for, but should solve the use-case discussed there.) 3. There's interest in allow a concept of "userspace reboots" where the kernel stays running, and userspace is swapped out (i.e. all services exit, and the rootfs transitioned into a new version of it) while keeping some select resources pinned, very similar to how we implement a switch root. Thus it is useful to allow services to exit, while leaving their fds around till the very end. This is exposed through a new FileDescriptorStorePreserve= setting that is closely modelled after RuntimeDirectoryPreserve= (in fact it reused the same internal type), since we want similar behaviour in the end, and quite often they probably want to be used together.
Diffstat (limited to 'src/core/load-fragment.h')
-rw-r--r--src/core/load-fragment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
index ab682ee23e..98adf5ae05 100644
--- a/src/core/load-fragment.h
+++ b/src/core/load-fragment.h
@@ -101,7 +101,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_exec_selinux_context);
CONFIG_PARSER_PROTOTYPE(config_parse_exec_apparmor_profile);
CONFIG_PARSER_PROTOTYPE(config_parse_exec_smack_process_label);
CONFIG_PARSER_PROTOTYPE(config_parse_address_families);
-CONFIG_PARSER_PROTOTYPE(config_parse_runtime_preserve_mode);
+CONFIG_PARSER_PROTOTYPE(config_parse_exec_preserve_mode);
CONFIG_PARSER_PROTOTYPE(config_parse_exec_directories);
CONFIG_PARSER_PROTOTYPE(config_parse_set_credential);
CONFIG_PARSER_PROTOTYPE(config_parse_load_credential);