chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgroups: Cache controller masks and optimize queues.
[elogind.git]
/
src
/
core
/
dbus-job.c
diff --git
a/src/core/dbus-job.c
b/src/core/dbus-job.c
index e774383793b932bcddbce857867bb44d9263adba..923d545a0275a9ed1f651316923a5c86f4644d79 100644
(file)
--- a/
src/core/dbus-job.c
+++ b/
src/core/dbus-job.c
@@
-35,8
+35,8
@@
static int property_get_unit(
const char *interface,
const char *property,
sd_bus_message *reply,
const char *interface,
const char *property,
sd_bus_message *reply,
-
sd_bus_error *error
,
-
void *userdata
) {
+
void *userdata
,
+
sd_bus_error *error
) {
_cleanup_free_ char *p = NULL;
Job *j = userdata;
_cleanup_free_ char *p = NULL;
Job *j = userdata;
@@
-52,17
+52,21
@@
static int property_get_unit(
return sd_bus_message_append(reply, "(so)", j->unit->id, p);
}
return sd_bus_message_append(reply, "(so)", j->unit->id, p);
}
-static int method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata) {
+static int method_cancel(sd_bus *bus, sd_bus_message *message, void *userdata
, sd_bus_error *error
) {
Job *j = userdata;
Job *j = userdata;
+ int r;
assert(bus);
assert(message);
assert(j);
assert(bus);
assert(message);
assert(j);
- SELINUX_UNIT_ACCESS_CHECK(j->unit, bus, message, "stop");
+ r = selinux_unit_access_check(j->unit, bus, message, "stop", error);
+ if (r < 0)
+ return r;
+
job_finish_and_invalidate(j, JOB_CANCELED, true);
job_finish_and_invalidate(j, JOB_CANCELED, true);
- return sd_bus_reply_method_return(
bus,
message, NULL);
+ return sd_bus_reply_method_return(message, NULL);
}
const sd_bus_vtable bus_job_vtable[] = {
}
const sd_bus_vtable bus_job_vtable[] = {