Polkit: Difference between revisions
Update syntax for example systemd unit |
Show how to do authorization request debugging |
||
| Line 52: | Line 52: | ||
(This does ''not'' take into account the <code>security.polkit.adminIdentities</code> setting.) | (This does ''not'' take into account the <code>security.polkit.adminIdentities</code> setting.) | ||
=== Debugging requested rules === | |||
To have Polkit print debug information for every incoming authorization, it is possible to create a debugging rule and enable Polkit debug printing: | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
security.polkit = { | |||
debug = true; // Enables `polkit.log` function | |||
extraConfig = '' | |||
polkit.addRule(function(action, subject) { | |||
polkit.log(""); | |||
polkit.log("action=" + action); | |||
polkit.log("subject=" + subject); | |||
}); | |||
''; | |||
}; | |||
</nowiki>}} | |||
== Authentication agents == | == Authentication agents == | ||