]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
update credentials when reloading a service
authorJörg Thalheim <joerg@thalheim.io>
Thu, 27 Oct 2022 13:59:56 +0000 (15:59 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 1 Nov 2022 21:57:41 +0000 (22:57 +0100)
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

src/core/service.c

index 1e14cdc6ca028c082f9a67d08dc265d11d7486bd..42de40e1375c251d7592ec58ed2c10cc6702c34b 100644 (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;