chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
unit: add simple only-by-dependency flag for units
[elogind.git]
/
src
/
dbus-unit.c
diff --git
a/src/dbus-unit.c
b/src/dbus-unit.c
index e3e1be12ade2be09393e0198ca85ac57eda43096..5c474c0c1efc4daaa3b74934267ac56ac7fcca52 100644
(file)
--- 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,