summaryrefslogtreecommitdiff
path: root/src/core/execute.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-02 01:54:41 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-13 20:59:10 +0100
commit74dd6b515fa968c5710b396a7664cac335e25ca8 (patch)
tree4aa9a78c228ce5e2833e2b3ed0bbee931895f653 /src/core/execute.h
parent9ef4e1e5a2d0a9cc50406f1cae05f3918d6f0c2a (diff)
downloadsystemd-74dd6b515fa968c5710b396a7664cac335e25ca8.tar.gz
core: run each system service with a fresh session keyring
This patch ensures that each system service gets its own session kernel keyring automatically, and implicitly. Without this a keyring is allocated for it on-demand, but is then linked with the user's kernel keyring, which is OK behaviour for logged in users, but not so much for system services. With this change each service gets a session keyring that is specific to the service and ceases to exist when the service is shut down. The session keyring is not linked up with the user keyring and keys hence only search within the session boundaries by default. (This is useful in a later commit to store per-service material in the keyring, for example the invocation ID) (With input from David Howells)
Diffstat (limited to 'src/core/execute.h')
-rw-r--r--src/core/execute.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/execute.h b/src/core/execute.h
index 951c8f4da3..b376a6db55 100644
--- a/src/core/execute.h
+++ b/src/core/execute.h
@@ -228,12 +228,13 @@ typedef enum ExecFlags {
EXEC_APPLY_PERMISSIONS = 1U << 0,
EXEC_APPLY_CHROOT = 1U << 1,
EXEC_APPLY_TTY_STDIN = 1U << 2,
+ EXEC_NEW_KEYRING = 1U << 3,
/* The following are not used by execute.c, but by consumers internally */
- EXEC_PASS_FDS = 1U << 3,
- EXEC_IS_CONTROL = 1U << 4,
- EXEC_SETENV_RESULT = 1U << 5,
- EXEC_SET_WATCHDOG = 1U << 6,
+ EXEC_PASS_FDS = 1U << 4,
+ EXEC_IS_CONTROL = 1U << 5,
+ EXEC_SETENV_RESULT = 1U << 6,
+ EXEC_SET_WATCHDOG = 1U << 7,
} ExecFlags;
struct ExecParameters {