Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bindfs mapping bidirectional, remove host USER name from env #901

Merged
merged 2 commits into from Jan 12, 2024

Conversation

Nuru
Copy link
Sponsor Contributor

@Nuru Nuru commented Jan 12, 2024

REMINDER

This PR fixes an issue with using bindfs to work around file ownership issues caused by running the Docker daemon as root (#594). This support is provided as a courtesy, but the better solution is to run Docker in "rootless" mode, which is done automatically when you use Docker Desktop. Support for running Docker as root should be considered deprecated.

what

  • Use bi-directional UID and GUID mapping in bindfs mount of host filesystem
  • Remove host username ($USER) from Geodesic environment

why

  • To guard against CVE-2022-24765, git checks the ownership of all directories it looks at for configuration, and complains if it finds a directory with a different owner.
  • The host's username was injected to support ansible 8 years ago (Add Support for Native USER #65). It was never working properly on Debian due to the different structure of the adduser command on Debian vs Alpine, and should not be necessary now. If it turns out to be needed for some reason, we should develop a more robust solution.

references

@Nuru Nuru requested a review from aknysh January 12, 2024 03:38
@Nuru Nuru requested a review from a team as a code owner January 12, 2024 03:38
@Nuru Nuru merged commit 411dc9b into master Jan 12, 2024
3 checks passed
@Nuru Nuru deleted the bindfs-mapping branch January 12, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants