diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hostname/systemd-networkd-hostname.pkla | 4 | ||||
-rw-r--r-- | src/hostname/systemd-networkd-hostname.rules | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/hostname/systemd-networkd-hostname.pkla b/src/hostname/systemd-networkd-hostname.pkla new file mode 100644 index 0000000000..345ce617c6 --- /dev/null +++ b/src/hostname/systemd-networkd-hostname.pkla @@ -0,0 +1,4 @@ +[Allow systemd-networkd to set transient hostname] +Identity=unix-user:systemd-network +Action=org.freedesktop.hostname1.set-hostname +ResultAny=yes diff --git a/src/hostname/systemd-networkd-hostname.rules b/src/hostname/systemd-networkd-hostname.rules new file mode 100644 index 0000000000..b7b780da9e --- /dev/null +++ b/src/hostname/systemd-networkd-hostname.rules @@ -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; + } +}); |