2015-01-22 21:56:45 +08:00
|
|
|
src/core/org.freedesktop.systemd1.policy.in.in
|
2011-12-31 14:21:37 +08:00
|
|
|
src/hostname/org.freedesktop.hostname1.policy.in
|
2015-01-22 21:56:45 +08:00
|
|
|
src/import/org.freedesktop.import1.policy.in
|
2011-12-31 14:21:37 +08:00
|
|
|
src/locale/org.freedesktop.locale1.policy.in
|
2011-12-31 11:36:02 +08:00
|
|
|
src/login/org.freedesktop.login1.policy.in
|
2014-12-24 07:02:14 +08:00
|
|
|
src/machine/org.freedesktop.machine1.policy.in
|
2011-12-31 13:20:34 +08:00
|
|
|
src/timedate/org.freedesktop.timedate1.policy.in
|
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 22:07:17 +08:00
|
|
|
src/core/dbus-unit.c
|