[systemd-devel] systemd and hostname supplied by DHCP

Lennart Poettering lennart at poettering.net
Sat Oct 3 06:34:33 PDT 2015


On Fri, 02.10.15 14:00, Alessio Igor Bogani (alessioigorbogani at gmail.com) wrote:

> I would prefer avoid PolicyKit. Moreover in the systemd 219's README
> PolicyKit is stated as optional (line 141). So I have rebuild systemd
> disabling policykit explicitly and it doesn't work:
> 
> Oct 02 13:35:10 localhost systemd-networkd[235]: Got message
> type=error sender=:1.4 destination=:1.2 object=n/a interface=n/a
> member=n/a cookie=4 reply_cookie=12 error=Permission denied
> Oct 02 13:35:10 localhost systemd-networkd[235]: eth0            :
> Could not set hostname: Permission denied
> 
> Do you have any tips?

Well, we need some kind of policy framework in place there that allows
the "systemd-networkd" user to set the hostname. If you disable
PolicyKit you have none, and hence the permission is denied. 

Only other option I see is to run networkd with more caps, but I'd
really avoid that, given that it contains network-facing code.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list