mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 04:59:42 +00:00
Log all actions polkit actions
This commit is contained in:
parent
c3dda54f90
commit
4eb78554dd
|
@ -2,5 +2,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./apparmor.nix
|
./apparmor.nix
|
||||||
./auditd.nix
|
./auditd.nix
|
||||||
|
./polkit.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
14
system/shared/security/polkit.nix
Normal file
14
system/shared/security/polkit.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
security.polkit = {
|
||||||
|
enable = true;
|
||||||
|
debug = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Have polkit log all actions, if debug is enabled
|
||||||
|
extraConfig = lib.mkIf config.security.polkit.debug ''
|
||||||
|
/* Log authorization checks. */
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
polkit.log("user " + subject.user + " is attempting action " + action.id + " from PID " + subject.pid);
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue