klenin / Spawner

Cross-platform sandbox runner
4 stars 8 forks source link

Cross-platform sandboxing utility

Runs an executable in a controlled, isolated mode, setting tight limits on both permissions and resources.

Run with -h switch to get help.

Designed as part of CATS programming contest control system.

Features

Compatibility

Use --legacy switch or set SP_LEGACY environment variable to choose command-line interface.

Building

Visual Studio 2013+

git clone git@github.com:klenin/Spawner.git
cd Spawner
git submodule init
git submodule update
mkdir build
cd build
cmake ..
sp.sln

Visual Studio 2013+ solution sp.sln will be generated in ./Spawner/build.

GCC

There are numerous gcc distributions for Windows.

Basic steps are the same:

git clone git@github.com:klenin/Spawner.git
cd Spawner
git submodule init
git submodule update
mkdir build
cd build

Now g++ and make must be in your PATH.

With Nuwen-MinGW you might need to use

set LIB=C:\Nuwen-MinGW\MinGW\x86_64-w64-mingw32\lib

in order for cmake to find libuserenv.

With MinGW use:

cmake -G "MinGW Makefiles" -D CMAKE_CXX_COMPILER=g++.exe -D CMAKE_MAKE_PROGRAM=make.exe ..
make

And with MSYS2:

cmake -G "MSYS Makefiles"  -D CMAKE_CXX_COMPILER=g++ -D CMAKE_MAKE_PROGRAM=make ..
make

If you are using 64-bit system and want to build 32-bit:

cmake -D BIT32=True ..
make