The Super Capsicumizer 9000
capsicumizer is a sandbox launcher that imposes Capsicum capability mode onto an unsuspecting program, allowing "sysadmin style" or "oblivious" sandboxing (i.e. no source code modifications, all restrictions added externally).
You just write AppArmor-esque "profiles" and
capsicumizer takes care of sandboxing the applications.
capsicumizer is capable of launching some GUI applications (like gedit) on both Wayland and X11.
(GTK 3.24 required because of this patch)
Note: applications that use syscalls directly (instead of going through
libc) — namely, anything compiled with Golang's official compiler — won't be able to actually access files under the allowed paths.
This is because we rely on
LD_PRELOADing a library (libpreopen) that overrides libc functions like
open to make them use
openat style functions with pre-opened directory descriptors.
- a recent version of FreeBSD
- Meson build system
- libucl >=0.8.1 (pkg: #233383)
- libpreopen (that linked fork, at least for now) (pkg: someday)
Capsicumizer profiles are written in UCL syntax (which is pretty common on FreeBSD), and can be used as directly runnable scripts (
#!/usr/bin/env capsicumizer run = "/usr/local/bin/gedit"; access_path = [ "$HOME", "/usr/local", "/var/db/fontconfig", "/tmp", ]; library_path = [ "/lib", "/usr/lib", "/usr/local/lib", "/usr/local/lib/gvfs", "/usr/local/lib/gio/modules", "/usr/local/lib/gedit", ]; # gedit does not need any extra preloads # this is just an example ld_preload = [ "libgobject-2.0.so" ];
Environment variables are exposed as UCL variables.
By participating in this project you agree to follow the Contributor Code of Conduct.
This is free and unencumbered software released into the public domain.
For more information, please refer to the
UNLICENSE file or unlicense.org.