]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't explicitly run sync scripts as invoking user anymore
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 5 Mar 2024 12:03:10 +0000 (13:03 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 5 Mar 2024 13:26:45 +0000 (14:26 +0100)
We now change user to the invoking user when running sync scripts so
there's no need to explicitly run sync scripts as the invoking user
anymore.

mkosi/__init__.py

index d949d40184d51f052831a16e3077ca128b6ce59a..bbc0f8659a2e48247851e69bb0434e9a42721721 100644 (file)
@@ -454,11 +454,6 @@ def run_sync_scripts(context: Context) -> None:
                     env=env | context.config.environment,
                     stdin=sys.stdin,
                     sandbox=context.sandbox(network=True, options=options, scripts=hd),
-                    # Make sure we run as the invoking user when we're running as root so that files are owned by the
-                    # right user. bubblewrap will automatically map the running user to root in the user namespace it
-                    # creates.
-                    user=INVOKING_USER.uid,
-                    group=INVOKING_USER.gid,
                 )