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

cmd/snap-update-ns: ignore EROFS from rmdir/unlink #8285

Merged
merged 2 commits into from Mar 18, 2020

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented Mar 17, 2020

Surprisingly, unlink/remove can return EROFS when the file being removed
is a bind mount from writable filesystem onto a read-only filesystem.
This was not handled by snap-update-ns logic before.

The case was reported by the MAAS team, many thanks for their reliable
reproduction instructions.

Fixes: https://bugs.launchpad.net/snapd/+bug/1867752
Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

Surprisingly, unlink/remove can return EROFS when the file being removed
is a bind mount from writable filesystem onto a read-only filesystem.
This was not handled by snap-update-ns logic before.

The case was reported by the MAAS team, many thanks for their reliable
reproduction instructions.

Fixes: https://bugs.launchpad.net/snapd/+bug/1867752
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@zyga zyga added the Bug label Mar 17, 2020
Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this!

cmd/snap-update-ns/change.go Outdated Show resolved Hide resolved
@mvo5 mvo5 added this to the 2.44 milestone Mar 18, 2020
@bboozzoo bboozzoo merged commit d181915 into snapcore:master Mar 18, 2020
@zyga zyga deleted the fix/lp-1867752 branch March 18, 2020 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants