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

Add that /var/run or subpaths cannot be exposed when symlinked on host #544

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bbhtt
Copy link
Collaborator

@bbhtt bbhtt commented Oct 28, 2024

Flatpak internally sets up a /var/run to /run symlink https://github.com/flatpak/flatpak/blob/fd1b7e444016d1b44bdab7cb5642b0ac83bd4b9e/common/flatpak-run.c#L2281. If it is symlinked on host too, when using --filesystem=var/run/subpath bwrap gets called twice to create the same symlink and the second one will fail.

See also containers/bubblewrap@4109d59

@bbhtt
Copy link
Collaborator Author

bbhtt commented Oct 28, 2024

@TingPing would be nice if you can confirm this, it's based on some casual observation and a cursory look at the code.

Exposing /var/run/subpath seems to work, when it is not a symlink on host.

Flatpak internally sets up a /var/run to /run symlink https://github.com/flatpak/flatpak/blob/fd1b7e444016d1b44bdab7cb5642b0ac83bd4b9e/common/flatpak-run.c#L2281. If it is symlinked on host too, when using
`--filesystem=var/run/subpath` bwrap gets called twice to
create the same symlink and the second one will fail.

See also containers/bubblewrap@4109d59
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.

1 participant