Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
/ nslite Public archive

Lightweight Linux namespace utilities

License

Notifications You must be signed in to change notification settings

tobert/nslite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nslite - chroot/exec with namespace support

Linux has had namespace support for a little while. Probably the most common user of it is LXC. For a lot of purposes, LXC is overkill. I was curious about how to use the underlying syscalls for another project and wrote nsfork.c. After discussing it with a friend who's doing some nice work with busybox inside chroots, I decided to throw this together for general use.

Requirements

Linux >= 2.6.24 with CONFIG_NAMESPACES=y

Root or CAP_SYS_ADMIN privileges

Build

make

The included Makefile should work on any modern distribution. Let me know if that proves false.

Example

mkdir -p /tmp/root/bin
cp `which busybox.static` /tmp/root/bin/busybox
sudo ./nschroot /tmp/root /bin/busybox msh
mkdir /proc
mount none /proc -t proc
ps -ef
ls -l /

Ideas / To do

  • fill in nsexec
  • add user/group switching
  • add capabilities(7) support
  • LD_PRELOAD example
  • busybox applet?

Author

Amy Tobey [email protected] @MissAmyTobey

License

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. See the file LICENSE for details.

About

Lightweight Linux namespace utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published