#include "sd-json.h"
#include "bitfield.h"
+#include "bus-polkit.h"
#include "cgroup.h"
#include "condition.h"
#include "dbus-job.h"
if (r < 0)
return r;
+ r = mac_selinux_unit_access_check_varlink(unit, link, "start");
+ if (r < 0)
+ return sd_varlink_error(link, SD_VARLINK_ERROR_PERMISSION_DENIED, NULL);
+
+ r = varlink_verify_polkit_async(
+ link,
+ manager->system_bus,
+ "org.freedesktop.systemd1.manage-units",
+ /* details= */ NULL,
+ &manager->polkit_registry);
+ if (r <= 0)
+ return r;
+
if (p.markers_found)
unit->markers = unit_normalize_markers((unit->markers & ~p.markers_mask), p.markers);