core: unit_label_path(): take const unit

This commit is contained in:
Christian Göttsche 2019-12-23 23:06:38 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 2979f04b99
commit f156e60c66
2 changed files with 4 additions and 2 deletions

View File

@ -5803,9 +5803,11 @@ bool unit_needs_console(Unit *u) {
return exec_context_may_touch_console(ec);
}
const char *unit_label_path(Unit *u) {
const char *unit_label_path(const Unit *u) {
const char *p;
assert(u);
/* Returns the file system path to use for MAC access decisions, i.e. the file to read the SELinux label off
* when validating access checks. */

View File

@ -842,7 +842,7 @@ int unit_warn_leftover_processes(Unit *u);
bool unit_needs_console(Unit *u);
const char *unit_label_path(Unit *u);
const char *unit_label_path(const Unit *u);
int unit_pid_attachable(Unit *unit, pid_t pid, sd_bus_error *error);