From 229abeaf8d0071e37c5c6346d94af434864cf6b9 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 15 Jun 2026 21:34:56 +0100 Subject: [PATCH] core: only attempt to deserialize state from LUO on boot Avoid trying to query for our LUO session on reexec/softreboot/reload/etc. Currently /dev/liveupdate is only accessible to root so it's not a big issue, but this might change in the future, so make sure nobody can play games with us. Follow-up for 257c35c1a3936f53b80f16397a6909f4cd81124d --- src/core/manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index 971f01903c..1ee2228c89 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2194,8 +2194,10 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds, Hashmap *named_ m->soft_reboots_count++; /* If a LUO (Live Update Orchestrator) session from a previous kexec is available, restore - * preserved file descriptors into the appropriate service fd stores now, before coldplug. */ - (void) manager_luo_restore_fd_stores(m); + * preserved file descriptors into the appropriate service fd stores now, before coldplug. + * Only do this when booting up (i.e., skip on reexec/soft reboot/etc.) */ + if (m->previous_objective < 0) + (void) manager_luo_restore_fd_stores(m); /* Pick up fds passed via the LISTEN_FDS=/LISTEN_FDNAMES= protocol that are tagged with a * unit id ("unit-id|fdname"), and route them into the matching unit's fd store. Untagged