summaryrefslogtreecommitdiff
path: root/src/core/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-02 11:21:24 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-02 11:21:24 +0200
commita8c0f367142dcaa08e1d1aa8398207d4f762cef8 (patch)
treeab178c51603af8d647254a078ddf56e6a05616d6 /src/core/dbus-unit.c
parentd18ec0491ed7c502080c03fa5fe93c8b6ac3d6ea (diff)
parentefdb02375beb0a940c3320865572913780b4d7de (diff)
Merge pull request #1116 from poettering/unified-rebased
core: unified cgroup hierarchy support
Diffstat (limited to 'src/core/dbus-unit.c')
-rw-r--r--src/core/dbus-unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 1e6291e762..31016b6c4a 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -25,6 +25,7 @@
#include "cgroup-util.h"
#include "strv.h"
#include "bus-common-errors.h"
+#include "special.h"
#include "dbus.h"
#include "dbus-unit.h"
@@ -973,6 +974,8 @@ static int bus_unit_set_transient_property(
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "The slice property is only available for units with control groups.");
if (u->type == UNIT_SLICE)
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Slice may not be set for slice units.");
+ if (unit_has_name(u, SPECIAL_INIT_SCOPE))
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Cannot set slice for init.scope");
r = sd_bus_message_read(message, "s", &s);
if (r < 0)