diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-15 20:25:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-15 20:25:10 +0200 |
commit | b5af2aca120f1bf13cffc270803c2232918dd967 (patch) | |
tree | 69b8c2fcb5584ce2ef6970e03da5af55c7647eeb /src/core/dbus-manager.c | |
parent | def9a7aa0182e5ecca3ac61b26f75136a5c4f103 (diff) | |
parent | b39a2770ba55637da80e2e389222c59dbea73507 (diff) |
Merge commit 'b39a2770ba55637da80e2e389222c59dbea73507'
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r-- | src/core/dbus-manager.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index ffef0c7d05..e4d6369c69 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -34,6 +34,7 @@ #include "architecture.h" #include "env-util.h" #include "dbus.h" +#include "dbus-job.h" #include "dbus-manager.h" #include "dbus-unit.h" #include "dbus-snapshot.h" @@ -685,13 +686,7 @@ static int method_cancel_job(sd_bus *bus, sd_bus_message *message, void *userdat if (!j) return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_JOB, "Job %u does not exist.", (unsigned) id); - r = selinux_unit_access_check(j->unit, message, "stop", error); - if (r < 0) - return r; - - job_finish_and_invalidate(j, JOB_CANCELED, true); - - return sd_bus_reply_method_return(message, NULL); + return bus_job_method_cancel(bus, message, j, error); } static int method_clear_jobs(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) { |