summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-04-22 02:03:08 +0200
committerLennart Poettering <lennart@poettering.net>2012-04-22 02:04:12 +0200
commitcc1368e3b3585ab822d76e00945ed4c064047530 (patch)
treed7f0fdccee9b80dddfb21f64312cb06e2aec735a
parent3d9a412243035beeaaf3465a62065444a5adf21c (diff)
loginctl: avoid segfault for kill-session and kill-user commands
As reported by Mantas Mikulėnas. http://lists.freedesktop.org/archives/systemd-devel/2012-April/004993.html
-rw-r--r--src/login/loginctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 3ec8057d3b..18f56f0124 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1260,7 +1260,7 @@ static int kill_session(DBusConnection *bus, char **args, unsigned n) {
if (!dbus_message_append_args(m,
DBUS_TYPE_STRING, &args[i],
DBUS_TYPE_STRING, &arg_kill_who,
- DBUS_TYPE_INT32, arg_signal,
+ DBUS_TYPE_INT32, &arg_signal,
DBUS_TYPE_INVALID)) {
log_error("Could not append arguments to message.");
ret = -ENOMEM;
@@ -1464,7 +1464,7 @@ static int kill_user(DBusConnection *bus, char **args, unsigned n) {
u = (uint32_t) uid;
if (!dbus_message_append_args(m,
DBUS_TYPE_UINT32, &u,
- DBUS_TYPE_INT32, arg_signal,
+ DBUS_TYPE_INT32, &arg_signal,
DBUS_TYPE_INVALID)) {
log_error("Could not append arguments to message.");
ret = -ENOMEM;