Skip to content

Instantly share code, notes, and snippets.

@prologic
Created April 9, 2020 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/7a55a8e977d50a95af533e1daac9d874 to your computer and use it in GitHub Desktop.
Save prologic/7a55a8e977d50a95af533e1daac9d874 to your computer and use it in GitHub Desktop.
Minimal working Container Sandboxing on uLinux with POSIX Shell scripts
# ./congine /bin/sh
# hostname
container
# id
uid=0(root) gid=0(root) groups=0(root),0(root),65534,65534,65534,65534,65534,65534
# ps aux
PID USER TIME COMMAND
1 root 0:00 /bin/sh
4 root 0:00 ps aux
# Container Terminated
# mount
/dev/root on / type ext2 (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
none on /dev type tmpfs (rw,nosuid,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
none on /dev/shm type tmpfs (rw,relatime)
none on /tmp type tmpfs (rw,relatime,mode=1777)
#
@prologic
Copy link
Author

prologic commented Apr 9, 2020

This is based on modified congine and will likely become part of uLinux's core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment