GithubHelp home page GithubHelp logo

souk4711 / hakoniwa Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 3.0 327 KB

Process isolation for Linux using namespaces, resource limits and seccomp.

License: Apache License 2.0

Rust 99.26% C 0.07% C++ 0.08% Java 0.10% Go 0.07% Python 0.02% Ruby 0.02% TypeScript 0.06% Makefile 0.31%
security linux-namespaces process-isolation sandbox sandboxing linux rust

hakoniwa's People

Contributors

wseng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hakoniwa's Issues

Using a fuse root

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());

https://gitlab.com/girderstream/yet-another-build-app/-/commit/9c13a7646f1ec6d2d082ba6123a292245c00b6af#4ad8bc8a608cd170d23921a8583c12f260dbcf58_0_54

[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?

custom stdio pipe?

anyway to have custom stdio pipe, like I wish to send stdio and stderr to websocket sink. Any guidance?

disallow port mapping?

I want to share the net but don't want my sandbox application to bind a port.
Is there any way to achieve that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.