]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Run qemu as the invoking user again 1973/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 12 Oct 2023 12:34:12 +0000 (14:34 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 13 Oct 2023 09:48:40 +0000 (11:48 +0200)
commitbaf1c3cd12c3d945e2abf7bfa922b27042633861
tree45aeb5529f6a62597fcae63ee69e8f1004c76147
parent10c3685b5ac50ed7d51cd26fedadf5b4a7761f09
Run qemu as the invoking user again

This commit also reworks InvokingUser to calculate all its members
on module import (when we haven't yet unshared the user namespace).
become_root() is also changed to modify the InvokingUser object
instead of returning the new uid, gid. Finally, we stop passing
around uid, gid everywhere and just use the InvokingUser object
directly as a singleton.

We also stop dropping privileges in mkosi itself. Instead, we prefer
running ssh, qemu and the embedded web server unprivileged. This
allows us to get rid of the logic to not unmount the last tools tree
as we will now always still have enough privileges to do so.

We also start passing file descriptors to swtpm and virtiofsd to avoid
race conditions where the socket hasn't been created yet before we
pass it to qemu or before we try to chown it.
mkosi/__init__.py
mkosi/config.py
mkosi/mounts.py
mkosi/qemu.py
mkosi/run.py
mkosi/state.py
mkosi/util.py