Comments (6)
So, --chroot
is not required, it merely says
Bind /chroot
as the new /
This should work
$ ./nsjail -Ml --port 9000 --user 99999 --group 99999 -R /bin/ -R /lib -R /lib64/ -- /bin/sh -i
from nsjail.
Also, ldd
is your friend when assessing which directories to include
$ ldd /bin/sh
linux-vdso.so.1 => (0x00007ffc20bdb000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fc2d9ff4000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc2d9df0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2d9a27000)
/lib64/ld-linux-x86-64.so.2 (0x000056244eb4e000)
from nsjail.
Ah.. you mean the README.md example? Let me check...
Ok... the assumption here is that you have a valid file-system inside /chroot - that you can install e.g. via debootstrap
from nsjail.
Thanks @robertswiecki, maybe it is meant to be like this(?):
./nsjail -Ml --port 9000 --user 99999 --group 99999 --chroot / -- /bin/sh -i
Anyway, getting an error message on the first try is probably not desirable.
I also suggest to add a short build instruction with the list of needed packages.
I found Dockerfile helpful.
from nsjail.
Just started using nsjail to sandbox some python scripts and it was disappointing to see strange errors for the basic use cases in README.md. Now it is clear. :) Thanks.
- Suggestion: it is time saving and reassuring if basic use cases are well explained and straightforward to test.
from nsjail.
Thanks.
I've done some README.md changes in ed2bf6e - Hope this helps.
from nsjail.
Related Issues (20)
- Build fails on armv7l (32 bit) HOT 2
- mnt:mountPt fails with invalid argument HOT 1
- Better fs isolation HOT 2
- Using nsjail with GPU and OpenGL HOT 1
- Include installation instructions in the README HOT 1
- Compilation fails HOT 1
- blank
- Updated vendored kafel to enable build on gcc13 HOT 1
- Python Tracing and Runtime security
- Build failed on arm64 with clang-15 HOT 1
- Build Fails when compiling on musl-libc system HOT 6
- config.cc uses old protobuf log handling API that was removed in protobuf 22.0 HOT 1
- SIGTERM Default Handler Issue HOT 1
- Exploring nsjail for Application Isolation with ROS2 HOT 1
- Error while loading shared libraries only when using config file HOT 9
- bind mounted /var/run/netns acts differently if nsjail started before or after network namespace is created HOT 1
- IPC resources should be explicitly cleaned up upon jail exit
- Invalid Argument - clone(flags=CLONE_NEWNS|CLONE_NEWCGROUP|CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|CLONE_NEWPID) failed HOT 5
- Ubuntu 24.x "permission denied" in `mount(/, /)` HOT 5
- How to mount GPU devices correctly in nsjail?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsjail.