2021-10-01 13:21:09 +03:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2018-02-16 16:25:32 +03:00
src/core/org.freedesktop.systemd1.policy.in
2020-01-30 17:14:32 +03:00
src/home/org.freedesktop.home1.policy
2023-07-13 14:39:48 +03:00
src/home/pam_systemd_home.c
2018-02-16 16:25:32 +03:00
src/hostname/org.freedesktop.hostname1.policy
src/import/org.freedesktop.import1.policy
src/locale/org.freedesktop.locale1.policy
src/login/org.freedesktop.login1.policy
src/machine/org.freedesktop.machine1.policy
2019-07-28 16:11:54 +03:00
src/network/org.freedesktop.network1.policy
2018-05-27 11:33:59 +03:00
src/portable/org.freedesktop.portable1.policy
2018-02-16 16:25:32 +03:00
src/resolve/org.freedesktop.resolve1.policy
2023-06-30 05:58:41 +03:00
src/sysupdate/org.freedesktop.sysupdate1.policy
2018-02-16 16:25:32 +03:00
src/timedate/org.freedesktop.timedate1.policy
core: pass details to polkit for some unit actions
The following details are passed:
- unit: the primary name of the unit upon which the action was
invoked (i.e. after resolving any aliases);
- verb: one of 'start', 'stop', 'reload', 'restart', 'try-restart',
'reload-or-restart', 'reload-or-try-restart', 'kill',
'reset-failed', or 'set-property', corresponding to the
systemctl verb used to invoke the action.
Typical use of these details in a polkit policy rule might be:
// Allow alice to manage example.service;
// fall back to implicit authorization otherwise.
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "example.service" &&
subject.user == "alice") {
return polkit.Result.YES;
}
});
We also supply a custom polkit message that includes the unit's name and
the requested operation.
2015-09-05 17:07:17 +03:00
src/core/dbus-unit.c