Skip to content

Commit

Permalink
Merge pull request #2508 from CodethinkLabs/richardmaw/shared-build-m…
Browse files Browse the repository at this point in the history
…achine-fixes

Misc fixes for running mkosi as root on a shared build machines
  • Loading branch information
behrmann authored Mar 14, 2024
2 parents fff6f24 + f800ad9 commit b356e04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4023,7 +4023,7 @@ def sync_repository_metadata(context: Context) -> None:

def run_sync(args: Args, config: Config, *, resources: Path) -> None:
if os.getuid() == 0:
os.setgroups([INVOKING_USER.gid])
os.setgroups(os.getgrouplist(INVOKING_USER.name(), INVOKING_USER.gid))
os.setgid(INVOKING_USER.gid)
os.setuid(INVOKING_USER.uid)

Expand Down
2 changes: 1 addition & 1 deletion mkosi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,7 @@ def sandbox(
relaxed=relaxed,
scripts=scripts,
tools=self.tools(),
options=[*options, *mounts],
options=[*mounts, *options],
)


Expand Down

0 comments on commit b356e04

Please sign in to comment.