summaryrefslogtreecommitdiff
path: root/src/core/dbus-manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-14 22:44:45 +0200
committerLennart Poettering <lennart@poettering.net>2014-05-14 22:58:43 +0200
commit4f4f70361a64957c45a2d8f40bfb04c77b454697 (patch)
tree08ae051d5f915b3603a315a90a52497fccab6368 /src/core/dbus-manager.c
parent04552566fa357d3029f06b66690dc28752522e10 (diff)
core: no need to pass bus object to selinux access check calls anymore
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r--src/core/dbus-manager.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 135d31465d..58e484df80 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -360,7 +360,7 @@ static int method_get_unit(sd_bus *bus, sd_bus_message *message, void *userdata,
if (!u)
return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s not loaded.", name);
- r = selinux_unit_access_check(u, bus, message, "status", error);
+ r = selinux_unit_access_check(u, message, "status", error);
if (r < 0)
return r;
@@ -404,7 +404,7 @@ static int method_get_unit_by_pid(sd_bus *bus, sd_bus_message *message, void *us
if (!u)
return sd_bus_error_setf(error, BUS_ERROR_NO_UNIT_FOR_PID, "PID %u does not belong to any loaded unit.", pid);
- r = selinux_unit_access_check(u, bus, message, "status", error);
+ r = selinux_unit_access_check(u, message, "status", error);
if (r < 0)
return r;
@@ -434,7 +434,7 @@ static int method_load_unit(sd_bus *bus, sd_bus_message *message, void *userdata
if (r < 0)
return r;
- r = selinux_unit_access_check(u, bus, message, "status", error);
+ r = selinux_unit_access_check(u, message, "status", error);
if (r < 0)
return r;
@@ -604,7 +604,7 @@ static int method_start_transient_unit(sd_bus *bus, sd_bus_message *message, voi
if (mode < 0)
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Job mode %s is invalid.", smode);
- r = selinux_access_check(bus, message, "start", error);
+ r = selinux_access_check(message, "start", error);
if (r < 0)
return r;
@@ -656,7 +656,7 @@ static int method_get_job(sd_bus *bus, sd_bus_message *message, void *userdata,
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, bus, message, "status", error);
+ r = selinux_unit_access_check(j->unit, message, "status", error);
if (r < 0)
return r;
@@ -685,7 +685,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, bus, message, "stop", error);
+ r = selinux_unit_access_check(j->unit, message, "stop", error);
if (r < 0)
return r;
@@ -702,7 +702,7 @@ static int method_clear_jobs(sd_bus *bus, sd_bus_message *message, void *userdat
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reboot", error);
+ r = selinux_access_check(message, "reboot", error);
if (r < 0)
return r;
@@ -719,7 +719,7 @@ static int method_reset_failed(sd_bus *bus, sd_bus_message *message, void *userd
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -740,7 +740,7 @@ static int method_list_units(sd_bus *bus, sd_bus_message *message, void *userdat
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -805,7 +805,7 @@ static int method_list_jobs(sd_bus *bus, sd_bus_message *message, void *userdata
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -855,7 +855,7 @@ static int method_subscribe(sd_bus *bus, sd_bus_message *message, void *userdata
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -888,7 +888,7 @@ static int method_unsubscribe(sd_bus *bus, sd_bus_message *message, void *userda
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -914,7 +914,7 @@ static int method_dump(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -945,7 +945,7 @@ static int method_create_snapshot(sd_bus *bus, sd_bus_message *message, void *us
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "start", error);
+ r = selinux_access_check(message, "start", error);
if (r < 0)
return r;
@@ -977,7 +977,7 @@ static int method_remove_snapshot(sd_bus *bus, sd_bus_message *message, void *us
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "stop", error);
+ r = selinux_access_check(message, "stop", error);
if (r < 0)
return r;
@@ -1003,7 +1003,7 @@ static int method_reload(sd_bus *bus, sd_bus_message *message, void *userdata, s
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -1031,7 +1031,7 @@ static int method_reexecute(sd_bus *bus, sd_bus_message *message, void *userdata
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -1050,7 +1050,7 @@ static int method_exit(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "halt", error);
+ r = selinux_access_check(message, "halt", error);
if (r < 0)
return r;
@@ -1070,7 +1070,7 @@ static int method_reboot(sd_bus *bus, sd_bus_message *message, void *userdata, s
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reboot", error);
+ r = selinux_access_check(message, "reboot", error);
if (r < 0)
return r;
@@ -1091,7 +1091,7 @@ static int method_poweroff(sd_bus *bus, sd_bus_message *message, void *userdata,
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "halt", error);
+ r = selinux_access_check(message, "halt", error);
if (r < 0)
return r;
@@ -1111,7 +1111,7 @@ static int method_halt(sd_bus *bus, sd_bus_message *message, void *userdata, sd_
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "halt", error);
+ r = selinux_access_check(message, "halt", error);
if (r < 0)
return r;
@@ -1131,7 +1131,7 @@ static int method_kexec(sd_bus *bus, sd_bus_message *message, void *userdata, sd
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reboot", error);
+ r = selinux_access_check(message, "reboot", error);
if (r < 0)
return r;
@@ -1153,7 +1153,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reboot", error);
+ r = selinux_access_check(message, "reboot", error);
if (r < 0)
return r;
@@ -1217,7 +1217,7 @@ static int method_set_environment(sd_bus *bus, sd_bus_message *message, void *us
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -1243,7 +1243,7 @@ static int method_unset_environment(sd_bus *bus, sd_bus_message *message, void *
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -1270,7 +1270,7 @@ static int method_unset_and_set_environment(sd_bus *bus, sd_bus_message *message
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "reload", error);
+ r = selinux_access_check(message, "reload", error);
if (r < 0)
return r;
@@ -1306,7 +1306,7 @@ static int method_list_unit_files(sd_bus *bus, sd_bus_message *message, void *us
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -1357,7 +1357,7 @@ static int method_get_unit_file_state(sd_bus *bus, sd_bus_message *message, void
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -1384,7 +1384,7 @@ static int method_get_default_target(sd_bus *bus, sd_bus_message *message, void
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "status", error);
+ r = selinux_access_check(message, "status", error);
if (r < 0)
return r;
@@ -1495,7 +1495,7 @@ static int method_enable_unit_files_generic(
u = manager_get_unit(m, *i);
if (u) {
- r = selinux_unit_access_check(u, bus, message, verb, error);
+ r = selinux_unit_access_check(u, message, verb, error);
if (r < 0)
return r;
}
@@ -1553,7 +1553,7 @@ static int method_disable_unit_files_generic(
assert(message);
assert(m);
- r = selinux_access_check(bus, message, verb, error);
+ r = selinux_access_check(message, verb, error);
if (r < 0)
return r;
@@ -1594,7 +1594,7 @@ static int method_set_default_target(sd_bus *bus, sd_bus_message *message, void
assert(message);
assert(m);
- r = selinux_access_check(bus, message, "enable", error);
+ r = selinux_access_check(message, "enable", error);
if (r < 0)
return r;