ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
8d419f
From fc6e005962167c26b9ef6cdd9e3476abeeb47313 Mon Sep 17 00:00:00 2001
8d419f
From: Frantisek Sumsal <frantisek@sumsal.cz>
8d419f
Date: Mon, 9 May 2022 23:43:40 +0200
8d419f
Subject: [PATCH] core: annotate Reexecute() as NoReply
8d419f
8d419f
So we're able to tell from the introspection data that the method
8d419f
doesn't reply.
8d419f
8d419f
(cherry picked from commit 624f685fe8ff1a90370e02faf60d0292a8e01f26)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 man/org.freedesktop.systemd1.xml | 1 +
8d419f
 src/core/dbus-manager.c          | 2 +-
8d419f
 2 files changed, 2 insertions(+), 1 deletion(-)
8d419f
8d419f
diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml
8d419f
index bd69a00b57..e1abb7f389 100644
8d419f
--- a/man/org.freedesktop.systemd1.xml
8d419f
+++ b/man/org.freedesktop.systemd1.xml
8d419f
@@ -169,6 +169,7 @@ node /org/freedesktop/systemd1 {
8d419f
       Dump(out s output);
8d419f
       DumpByFileDescriptor(out h fd);
8d419f
       Reload();
8d419f
+      @org.freedesktop.DBus.Method.NoReply("true")
8d419f
       Reexecute();
8d419f
       @org.freedesktop.systemd1.Privileged("true")
8d419f
       Exit();
8d419f
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
8d419f
index 9b64a8074d..1a3098ceb1 100644
8d419f
--- a/src/core/dbus-manager.c
8d419f
+++ b/src/core/dbus-manager.c
8d419f
@@ -3105,7 +3105,7 @@ const sd_bus_vtable bus_manager_vtable[] = {
8d419f
                       NULL,
8d419f
                       NULL,
8d419f
                       method_reexecute,
8d419f
-                      SD_BUS_VTABLE_UNPRIVILEGED),
8d419f
+                      SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_METHOD_NO_REPLY),
8d419f
         SD_BUS_METHOD("Exit",
8d419f
                       NULL,
8d419f
                       NULL,