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 PID namespace support #64

Merged
merged 10 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ impl Sandbox for LinuxSandbox {
sandboxee.pre_exec(move || post_fork(uid, gid, self.allow_networking)).spawn()?
};

// TODO
// Drop root user mapping for the parent process.
// namespaces::create_user_namespace(uid, gid, Namespaces::empty()).unwrap();

cd-work marked this conversation as resolved.
Show resolved Hide resolved
Ok(child)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/linux/namespaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const NEW_ROOT: &str = "/tmp/birdcage-root";
///
/// This will deny access to any path which isn't part of `bind_mounts`. Allowed
/// paths are mounted according to their bind mount flags.
pub fn setup_mount_namespace(exceptions: PathExceptions) -> io::Result<()> {
pub(crate) fn setup_mount_namespace(exceptions: PathExceptions) -> io::Result<()> {
// Get target paths for new and old root.
let new_root = PathBuf::from(NEW_ROOT);

Expand Down
Loading