summaryrefslogtreecommitdiff
path: root/src/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-21 23:41:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-21 23:41:54 +0200
commitbc0f8771f23dc3952bf4b06301dc842ba625a0f2 (patch)
tree94654d913760d92660ffa0a6baf62681492bbbfb /src/dbus-unit.c
parentc0120d992ce5ab004d9be5ff6ca15e5fe17f9884 (diff)
unit: add simple only-by-dependency flag for units
Diffstat (limited to 'src/dbus-unit.c')
-rw-r--r--src/dbus-unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dbus-unit.c b/src/dbus-unit.c
index e3e1be12ad..5c474c0c1e 100644
--- a/src/dbus-unit.c
+++ b/src/dbus-unit.c
@@ -281,6 +281,9 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusMessage *message
int r;
char *path;
+ if (job_type == JOB_START && u->meta.only_by_dependency)
+ return bus_send_error_reply(m, message, NULL, -EPERM);
+
if (!dbus_message_get_args(
message,
&error,