richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
Blob Blame History Raw
From 53e9be6b9c38a7a7d943b01da6898355c535991e Mon Sep 17 00:00:00 2001
From: Marius Vollmer <mvollmer@redhat.com>
Date: Thu, 31 Oct 2013 15:55:07 +0200
Subject: [PATCH] logind: use correct "who" enum values with KillUnit.

rhel-only (in upstream fixed during dbus rewrite)

Resolves: #1155502
---
 src/login/logind-dbus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 6cabb7b..4137522 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -116,7 +116,7 @@
         "  <method name=\"KillSession\">\n"                             \
         "   <arg name=\"id\" type=\"s\" direction=\"in\"/>\n"           \
         "   <arg name=\"who\" type=\"s\" direction=\"in\"/>\n"          \
-        "   <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n"       \
+        "   <arg name=\"signal\" type=\"i\" direction=\"in\"/>\n"       \
         "  </method>\n"                                                 \
         "  <method name=\"KillUser\">\n"                                \
         "   <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n"          \
@@ -2814,7 +2814,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
         assert(manager);
         assert(unit);
 
-        w = who == KILL_LEADER ? "process" : "cgroup";
+        w = who == KILL_LEADER ? "main" : "all";
         assert_cc(sizeof(signo) == sizeof(int32_t));
 
         r = bus_method_call_with_reply(
@@ -2830,7 +2830,7 @@ int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo
                         DBUS_TYPE_INT32, &signo,
                         DBUS_TYPE_INVALID);
         if (r < 0) {
-                log_error("Failed to stop unit %s: %s", unit, bus_error(error, r));
+                log_error("Failed to kill unit %s: %s", unit, bus_error(error, r));
                 return r;
         }