summaryrefslogtreecommitdiffstats
path: root/src/network/systemd-networkd.rules
blob: 86cc8499080e07840e51d6e3563c7a47eafb6cce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// This file is part of systemd.
// See systemd-networkd.service(8) and polkit(8) for more information.

// Allow systemd-networkd to set timezone, get product UUID,
// and transient hostname
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.hostname1.set-hostname" ||
         action.id == "org.freedesktop.hostname1.get-product-uuid" ||
         action.id == "org.freedesktop.timedate1.set-timezone") &&
        subject.user == "systemd-network") {
        return polkit.Result.YES;
    }
});