Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

80-fprintd.rules (Source)

/*
.. File: 80-fprintd.rules
.. Startdate: 2023-01-12-5 15:59
.. History:
..    2024-09-24 updated for current correctness required
.. Purpose: replaced fprintd.pkla for bgconf 0.1.34
.. Origin: placed by fingerprint-scanner.sh
*/
polkit.addRule(function(action, subject) {
   if (
         (
            action.id.match("net.reactivated.fprint.device.enroll") ||
            action.id.match("net.reactivated.fprint.device.verify")
         ) && subject.active) {
      polkit.log("action=" + action);
      polkit.log("subject=" + subject);
      return polkit.Result.YES;
   }
});
polkit.addRule(function(action, subject) {
   if (
         (
            action.id.match("net.reactivated.fprint.device.setusername")
         ) && subject.active && subject.isInGroup("admins")) {
      polkit.log("action=" + action);
      polkit.log("subject=" + subject);
      return polkit.Result.YES;
   }
});