Giter Club home page Giter Club logo

appjail's Introduction

appjail is a tool that runs an application in an isolated environment, or jail. 
It is designed to be executed by an unprivileged user. When called, it sets up 
a new IPC, mount and PID namespace. It then unmounts the /home, /var/tmp and 
/tmp directories and replaces them with private ones. The jail further gets its 
private POSIX shared memory space (/dev/shm) and private set of pseudo TTYs. 
Inside the jail, it is impossible to raise privileges using setuid binaries or 
file capabilities.

appjail requires a kernel with the following options enabled:
 CONFIG_NAMESPACES=y
 CONFIG_IPC_NS=y
 CONFIG_PID_NS=y
It also needs a file system with support for file capabilities.

To compile and install appjail, run the following commands:
 $ ./autogen.sh
 $ ./configure
 $ make
Then, as root, run
 # make install
 # setcap cap_sys_admin,cap_chown,cap_net_admin=p /usr/local/bin/appjail
If you don't need the -N option, run instead
 # setcap cap_sys_admin,cap_chown=p /usr/local/bin/appjail

Usage examples:

* Run skype. Create ~/jailhomes/skype and execute
   $ appjail -X --x11-trusted -H ~/jailhomes/skype -R user --keep-ipc-namespace --keep-shm skype
  Qt applications like skype needs --keep-ipc-namespace to communicate with the X
  server via the MIT-SHM extension. Pulseaudio requires --keep-shm to function.

* Run steam. Create ~/jaihomes/steam and execute
   $ appjail -X --x11-trusted -H ~/jailhomes/steam -R user --system-bus --keep-ipc-namespace --keep-shm steam
  Note that steam crashes without --system-bus. It works without --keep-ipc-namespace,
  but you lose hardware accelerated GUI rendering and video decoding.

appjail's People

Contributors

brain0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.