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

Fix mounting special files #56

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Fix mounting special files #56

merged 4 commits into from
Oct 16, 2023

Conversation

cd-work
Copy link
Collaborator

@cd-work cd-work commented Oct 13, 2023

No description provided.

Cargo.toml Show resolved Hide resolved
This fixes sandboxing exceptions for special files on Linux. Previously
birdcage would explicitly panic.
@cd-work cd-work marked this pull request as ready for review October 16, 2023 20:56
@cd-work cd-work requested a review from kylewillmon October 16, 2023 20:56
@cd-work cd-work changed the title WIP: Fix mounting special files Fix mounting special files Oct 16, 2023
Copy link
Contributor

@kylewillmon kylewillmon left a comment

Choose a reason for hiding this comment

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

Needs a CHANGELOG entry, I think.

This bug technically doesn't exist in a released version since 0.4 was yanked. But the tag and CHANGELOG entry still exist for 0.4, so it's still a good idea to explain the changes between 0.4 and 0.4+next

let tempdir = TempDir::new().unwrap();
let symlink_str = tempdir.path().to_string_lossy() + "_tmpfile";
let symlink_path = PathBuf::from(symlink_str.as_ref());
unixfs::symlink(&tempdir, &symlink_path).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

There might be some value in adding a broken symlink to one of these tests just to make sure that birdcage.lock() still succeeds. Although the symlink should remain broken inside the sandbox, so maybe that is pointless.

@cd-work cd-work requested a review from kylewillmon October 16, 2023 21:48
@cd-work cd-work merged commit dd85d24 into main Oct 16, 2023
9 checks passed
@cd-work cd-work deleted the null branch October 16, 2023 22:51
@cd-work cd-work self-assigned this Oct 16, 2023
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.

2 participants