From: Jörg Thalheim Date: Fri, 16 Sep 2022 12:41:58 +0000 (+0200) Subject: also provide credentials in ExecStartPre X-Git-Tag: v252-rc1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7f64b896201da4a11da158c35865604cf02062f;p=thirdparty%2Fsystemd.git 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 --- 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;