IT lexicon › Security › Casper (FreeBSD)

Casper (FreeBSD)

Security På svenska → Updated: 2026-11-09

Helper services that let a program locked inside Capsicum do the few things its sandbox otherwise forbids, such as DNS lookups.

Capsicum has a practical snag: after cap_enter() you can no longer open /etc/resolv.conf or read the password database, so a program that needs to resolve a hostname can't sandbox itself. Casper gets round this by letting the program spawn small helpers before the door shuts. Each service — cap_dns, cap_pwd, cap_sysctl, cap_fileargs and others — runs outside the sandbox and answers requests over a socket.

The clever part is that the services can be restricted too: a cap_dns allowed to resolve only certain names, a cap_fileargs that opens only the files given on the command line. The first version was a central daemon; FreeBSD 11 turned it into the libcasper library, where helpers are forked from the program itself.

← Back to the lexicon