Merge pull request #4701 from martinpitt/networkd-polkit

hostnamed: allow networkd to set the transient hostname
This commit is contained in:
Lennart Poettering
2016-11-21 18:24:51 +01:00
committed by GitHub
4 changed files with 76 additions and 5 deletions
@@ -0,0 +1,4 @@
[Allow systemd-networkd to set transient hostname]
Identity=unix-user:systemd-network
Action=org.freedesktop.hostname1.set-hostname
ResultAny=yes
@@ -0,0 +1,5 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.hostname1.set-hostname" && subject.user == "systemd-network") {
return polkit.Result.YES;
}
});