Skip to content

bind-try: ignore deleted bind mount sources - #817

Open
sairex53 wants to merge 1 commit into
containers:mainfrom
sairex53:fix/811-bind-try-deleted-source
Open

sairex53 wants to merge 1 commit into
containers:mainfrom
sairex53:fix/811-bind-try-deleted-source

Conversation

@sairex53

Copy link
Copy Markdown

--bind-try currently fails if its source was bind-mounted and then unlinked: opening the source succeeds, but the later mount() returns ENOENT. Treat that mount error as an absent source for try-bind operations.

Add a regression test that runs a nested bind-try before and after unlinking the original file.

Validation on Fedora 44 aarch64: meson compile -C build; meson test -C build --print-errorlogs (5 passed, 1 skipped because seccomp is unavailable). The new regression fails with the original binary and passes with the fix.

A source that has been unlinked after being bind-mounted can still be opened, but the bind mount syscall fails with ENOENT. Treat that as a missing source for try-bind operations.

Add a regression test for a bind-mounted file whose original path is deleted.

Fixes: containers#811
Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
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