summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-16 03:54:53 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-16 04:41:21 +0200
commited85d9a58d8e404877ec4bc2f2e9d31d16b98c47 (patch)
treef2f26624cd4835ad3e1069d806eb3f84827e04c5 /src
parent54b758dd1422f6a907b04ce309c764c5c91b2e59 (diff)
logind: filter configured cgroup controller lists
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-dbus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 4a8ffe5eda..d957bd7de5 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -487,8 +487,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
if (r < 0)
return -EINVAL;
- if (strv_contains(controllers, "systemd") ||
- !dbus_message_iter_next(&iter) ||
+ if (!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;
@@ -499,8 +498,7 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
if (r < 0)
goto fail;
- if (strv_contains(reset_controllers, "systemd") ||
- !dbus_message_iter_next(&iter) ||
+ if (!dbus_message_iter_next(&iter) ||
dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN) {
r = -EINVAL;
goto fail;
@@ -611,11 +609,11 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMess
session->type = t;
session->class = c;
session->remote = remote;
- session->controllers = controllers;
- session->reset_controllers = reset_controllers;
session->kill_processes = kill_processes;
session->vtnr = vtnr;
+ session->controllers = cg_shorten_controllers(controllers);
+ session->reset_controllers = cg_shorten_controllers(reset_controllers);
controllers = reset_controllers = NULL;
if (!isempty(tty)) {