richardphibel / rpms / systemd

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