souk4711 / hakoniwa Goto Github PK
View Code? Open in Web Editor NEWProcess isolation for Linux using namespaces, resource limits and seccomp.
License: Apache License 2.0
Process isolation for Linux using namespaces, resource limits and seccomp.
License: Apache License 2.0
Hi
I have the start of a basic filesystem written in rust on top of the fuser rust wrappers for fuse3
I would like to combine that code with something that uses your code to isolate a proccess to run in the file system i provide
I mount my file system at "/home/will/projects/buildsystems/yaba/hi" and i can run commands that interact with that fs, i can also run the commands in "/home/will/projects/buildsystems/yaba/hi/usr/bin/"
eg
sh-5.2$ /home/will/projects/buildsystems/yaba/hi/usr/bin/ls
Cargo.lock Cargo.toml examples hi Readme.md src target
I looked at your examples and i cant find something that effectively pivot roots so had a go with the following
sandbox.with_policy(SandboxPolicy::from_str(
r#"
mounts = [
{ source = "/home/will/projects/buildsystems/yaba/hi" , target = "/" },
]
"#,
).unwrap());
[2024-04-21T18:31:28Z INFO hakoniwa::executor] Result: {"status":"SE","reason":"mount(Some("/home/will/projects/buildsystems/yaba/hi"), "", None, MS_RDONLY | MS_NOSUID | MS_BIND | MS_REC, None) => ENOENT: No such file or directory","exit_code":null,"start_time":null,"real_time":null,"system_time":null,"user_time":null,"max_rss":null}
thread 'main' panicked at src/bin/yaba-exe.rs:72:5:
assertion left == right
failed
left: SandboxSetupError
right: Ok
I will keep looking but i wondered if i was doing something obviously wrong?
anyway to have custom stdio pipe, like I wish to send stdio and stderr to websocket sink. Any guidance?
I want to share the net but don't want my sandbox application to bind a port.
Is there any way to achieve that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.