]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't mount our own passwd when building images
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 28 Oct 2023 19:38:37 +0000 (21:38 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Sat, 28 Oct 2023 21:15:05 +0000 (23:15 +0200)
It's much more important that we use the image's /etc/passwd instead
of our own. Both inside and outside the image so that UIDs/GIDs get
resolved correctly.

mkosi/__init__.py

index 0a6c0357ca8ff228a678cb341d7c14046ff831ef..7071a8a3d309466dee1c8f247c3e77b300374933 100644 (file)
@@ -448,7 +448,6 @@ def run_build_scripts(state: MkosiState) -> None:
 
     with (
         mount_build_overlay(state),\
-        mount_passwd(state.root),\
         mount_volatile_overlay(state),\
         finalize_chroot_scripts(state) as cd\
     ):
@@ -2614,7 +2613,6 @@ def run_verb(args: MkosiArgs, images: Sequence[MkosiConfig]) -> None:
         with (
             complete_step(f"Building {config.image or 'default'} image"),\
             mount_tools(config.tools_tree),\
-            mount_passwd(),\
             prepend_to_environ_path(config)\
         ):
             # After tools have been mounted, check if we have what we need