policykit-1 version 0.105-17
I cannot seem to make the policykit rule work. All I want is to let anyone be able to run systemctl daemon-reload in the system (for test purposes).
I found the action name for this task from the file org.freedesktop.systemd1.policy as org.freedesktop.systemd1.reload-daemon. I have dropped in a simple rule as following:
/usr/share/polkit-1/rules.d/01-umut.rules
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.reload-daemon") {
return polkit.Result.YES;
}
});
I am expecting this rule to allow anyone run this action but that is not the case.
I have run policykit form the command line as sudo /usr/lib/policykit-1/polkitd and used polkit.log("Hello my rule"); in my rule just to see if the rule ever gets executed and no luck there either.
What am I missing?