summaryrefslogtreecommitdiff
path: root/src/logind-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logind-dbus.c')
-rw-r--r--src/logind-dbus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logind-dbus.c b/src/logind-dbus.c
index 69e6b189aa..93525980b7 100644
--- a/src/logind-dbus.c
+++ b/src/logind-dbus.c
@@ -316,7 +316,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
if (r < 0)
return -EINVAL;
- if (!dbus_message_iter_next(&iter) ||
+ if (strv_contains(controllers, "systemd") ||
+ !dbus_message_iter_next(&iter) ||
dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING) {
r = -EINVAL;
@@ -327,7 +328,8 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
if (r < 0)
goto fail;
- if (!dbus_message_iter_next(&iter) ||
+ if (strv_contains(reset_controllers, "systemd") ||
+ !dbus_message_iter_next(&iter) ||
dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN) {
r = -EINVAL;
goto fail;