-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add --bind-fd and --ro-bind-fd to let you bind a O_PATH fd.
This is useful for example if you for some reason don't have the real path. It is also a way to make bind-mounts race-free (i.e. to have the mount actually be the thing you wanted to be mounted, avoiding issues where some other process replaces the target in parallel with the bwrap launch. Unfortunately due to some technical details we can't actually directly mount the dirfd, as they come from different user namespace which is not permitted, but at least we can delay resolving the fd to a path as much as possible, and then validate after mount that we actually mounted the right thing. Signed-off-by: Alexander Larsson <[email protected]> (cherry picked from commit a253257) [smcv: Backport to 0.6.x] Signed-off-by: Simon McVittie <[email protected]>
- Loading branch information
1 parent
c54bbc6
commit 68e75c3
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters