CAP_SANDBOXED(3)
hey bestie, welcome to CAP_SANDBOXED(3) β the Library Functions Manual page that makes sandbox checking feel effortless π
β¨ NAME β¨
cap_sandboxed β check if you're in a capability mode sandbox π§
π LIBRARY π
Standard C Library (libc, -lc) π
π SYNOPSIS π
#include <sys/capsicum.h>
#include <stdbool.h>
bool
cap_sandboxed(void);
πΈ DESCRIPTION πΈ
okay so cap_sandboxed() is literally the vibe check. It returns true if the process is in a capability mode sandbox, or false if it is not. π¦
It's a more handy alternative to the cap_getmode(2) system call because it always succeeds β so there is no need for error checking, bestie. None. Zero. Not me worrying about return codes. π
If the support for capability mode is not compiled into the kernel, cap_sandboxed() will always return false. Periodt. β
π«Ά RETURN VALUES π«Ά
Function cap_sandboxed() is always successful and will return either true or false. Slay. That's the whole section, no jump scare. π
π SEE ALSO π
π°οΈ HISTORY π°οΈ
The cap_sandboxed() function first appeared in FreeBSD 9.2. iconic behavior honestly π
ποΈ AUTHORS ποΈ
This function was implemented and manual page was written by Pawel Jakub Dawidek <pawel@dawidek.net> under sponsorship of the FreeBSD Foundation. π
π and that's the page, bestie π β from the Debian edition, dated May 5, 2020. Now go be the main character of your own sandbox π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2012 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms