jailed

This program is used to run other programs in a non-privileged rootjail. Setting up a root jail is nontrivial for many programs, and beyond the scope of this webpage.

Usage:
jailed user [-g<group>] [-r<secs>] [-c<chroot>] [-p<pidfile>] [-n<programname>] [-e<var>=<val>] [-d] [program [arguments]]
This is set up such that you can use /etc/passwd as a configuration file, if you want. Or, you can specify everything on the command line.

If the jailroot root directory is writable by the jailroot user, then two files are created containing the stdout and stderr output of the program.
The files are named '/<programname>_stdout' and '/<programname>_stderr'. They are created with 0600 permissions.

In addition, if the mkfifo() call is available and the HAVE_MKFIO define is nonzero in the code (by default it is), then the fifo '/<programname>_stdin' is created. You can send the program stdin by simply echo'ing to the fifo.

Examples:
jailed www 
(Start a chroot environment with user www at www's home directory, and run whatever program www has as it's shell).

jailed games -c/opt/bfv /bfv_linded.static
(chroot to /opt/bfv, change the user to 'games', and run the program /bfv_linded.static)

Download: HERE
 
Author: johan (at)  linkdata (dot) se

SourceForge.net Logo