From e7f64b896201da4a11da158c35865604cf02062f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 16 Sep 2022 14:41:58 +0200 Subject: [PATCH] also provide credentials in ExecStartPre Systemd's credential interface is not yet natively supported by all programs yet. Hence it's often required to run scripts to massage secrets in the way the programs expect it. This commit allows the ExecStartPre commands to access credentials. Fixes https://github.com/systemd/systemd/issues/19604 --- src/core/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c index 6ceb0a20578..1e14cdc6ca0 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2293,7 +2293,7 @@ static void service_enter_start_pre(Service *s) { r = service_spawn(s, s->control_command, s->timeout_start_usec, - EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_IS_CONTROL|EXEC_APPLY_TTY_STDIN|EXEC_SETENV_MONITOR_RESULT, + EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_IS_CONTROL|EXEC_APPLY_TTY_STDIN|EXEC_SETENV_MONITOR_RESULT|EXEC_WRITE_CREDENTIALS, &s->control_pid); if (r < 0) goto fail; -- 2.47.3