update credentials when reloading a service

Many long-running services will reload configuration and therefore
credentials on reload. Therefore its useful if a service reload will
also update credentials.

Tested in https://github.com/numtide/systemd-vaultd/pull/12
This commit is contained in:
Jörg Thalheim
2022-11-01 22:57:41 +01:00
committed by Luca Boccassi
parent 2f23762451
commit 16a42b84cf
+1 -1
View File
@@ -2422,7 +2422,7 @@ static void service_enter_reload(Service *s) {
r = service_spawn(s,
s->control_command,
s->timeout_start_usec,
EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_IS_CONTROL|EXEC_CONTROL_CGROUP,
EXEC_APPLY_SANDBOXING|EXEC_APPLY_CHROOT|EXEC_IS_CONTROL|EXEC_CONTROL_CGROUP|EXEC_WRITE_CREDENTIALS,
&s->control_pid);
if (r < 0)
goto fail;