]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Only use unshare to become root if we're actually going to use a scope
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 1 Aug 2024 14:35:36 +0000 (16:35 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 2 Aug 2024 07:32:04 +0000 (09:32 +0200)
commit5c1b3d99fe87fa77bbcbe97cc4b1534f3cf2fe35
tree0211f2e635f4be4921e3f40fe7f1941c57468ce9
parent79539371d0b6d240c2f4e9c45ba68824ca748ecc
Only use unshare to become root if we're actually going to use a scope

If the relevant environment variables are not set, scope_cmd() will
return an empty list and we won't use a scope after all. In that case
we don't need to use unshare either to become root and can rely on our
own become_root() function so check whether we're actually going to use
a scope or not.
mkosi/qemu.py