summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/polkit/org.mageia.draksec.rules
blob: 45a7f0efea7ee04839363c37054b6848b5c32636 (plain)
1
2
3
4
5
6
7
8
9
10
11
polkit.addRule(function(action, subject) {
  if (typeof drakToolAuth != "function" || action.id.indexOf("org.mageia.") != 0)
    return polkit.Result.NOT_HANDLED;

  var tool = action.id.split(".")[2];
  var rv = drakToolAuth(tool);
  if (rv != polkit.Result.NOT_HANDLED)
    polkit.log("draksec security policy for '" + tool + "' is overriden to '" + rv + "'");
  return rv;
});