]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Make VM registration work unprivileged
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 10 Feb 2025 20:24:37 +0000 (21:24 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 11 Feb 2025 12:50:26 +0000 (13:50 +0100)
commitfc4df63ef8e681aa46caa2dd828945e175abd645
tree6801e84d37c0737c8437c8b8bd5c9be24c69c957
parent2c6c6a5c73d10488dc45a0e490e54fee14d82752
Make VM registration work unprivileged

Since systemd 257, it's possible for unprivileged users to register
VMs with systemd-machined (gated behind polkit). So let's not require
root privileges to register virtual machines with systemd-machined, but
only do it as an unprivileged user if registration is explicitly requested
to avoid the polkit prompt.

To avoid having to detect which systemd version the system is running,
we skip errors on varlink registration for now when running unprivileged.
https://github.com/systemd/systemd/pull/36344 will allow us to detect if
the machined varlink interface can be accessed as an unprivileged user or
not.
mkosi/qemu.py