]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/manager-serialize: deserialize handoff-timestamp fds
authorMike Yuan <me@yhndnzj.com>
Sat, 27 Apr 2024 06:08:10 +0000 (14:08 +0800)
committerMike Yuan <me@yhndnzj.com>
Sat, 27 Apr 2024 06:30:29 +0000 (14:30 +0800)
Follow-up for 817062e6211e7559ff91bcb7bb5dc4e472fc1646

Fixes #32512

src/core/manager-serialize.c

index 022d64a288d963fc13396677a279d3f04e0dfd94..b4af82b4e17cbf7a93d162284fbc15208c607311 100644 (file)
@@ -482,6 +482,15 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                         if (r < 0)
                                 log_warning_errno(r, "Failed to parse user-lookup fds: \"%s\", ignoring: %m", val);
 
+                } else if ((val = startswith(l, "handoff-timestamp-fds="))) {
+
+                        m->handoff_timestamp_event_source = sd_event_source_disable_unref(m->handoff_timestamp_event_source);
+                        safe_close_pair(m->handoff_timestamp_fds);
+
+                        r = deserialize_fd_many(fds, val, 2, m->handoff_timestamp_fds);
+                        if (r < 0)
+                                log_warning_errno(r, "Failed to parse handoff-timestamp fds: \"%s\", ignoring: %m", val);
+
                 } else if ((val = startswith(l, "dynamic-user=")))
                         dynamic_user_deserialize_one(m, val, fds, NULL);
                 else if ((val = startswith(l, "destroy-ipc-uid=")))