1 2 3 4 5
polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.hostname1.set-hostname" && subject.user == "systemd-network") { return polkit.Result.YES; } });