Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #281
Difficulty: Easy
A hypervisor or virtual machine monitor (VMM) is a computer software, firmware or hardware that creates and runs virtual private networks.
True or False?
Linux & Unix Commands - Search Man Pages

capsicum(4) [freebsd man page]

CAPSICUM(4)						   BSD Kernel Interfaces Manual 					       CAPSICUM(4)

Capsicum -- lightweight OS capability and sandbox framework SYNOPSIS
Capsicum is a lightweight OS capability and sandbox framework implementing a hybrid capability system model. Capsicum can be used for appli- cation and library compartmentalisation, the decomposition of larger bodies of software into isolated (sandboxed) components in order to implement security policies and limit the impact of software vulnerabilities. Capsicum provides two core kernel primitives: capability mode A process mode, entered by invoking cap_enter(2), in which access to global OS namespaces (such as the file system and PID names- paces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. Once set, the flag is inherited by future children processes, and may not be cleared. capabilities Limit operations that can be called on file descriptors. For example, a file descriptor returned by open(2) may be refined using cap_rights_limit(2) so that only read(2) and write(2) can be called, but not fchmod(2). The complete list of the capability rights can be found in the rights(4) manual page. In some cases, Capsicum requires use of alternatives to traditional POSIX APIs in order to name objects using capabilities rather than global namespaces: process descriptors File descriptors representing processes, allowing parent processes to manage child processes without requiring access to the PID namespace; described in greater detail in procdesc(4). anonymous shared memory An extension to the POSIX shared memory API to support anonymous swap objects associated with file descriptors; described in greater detail in shm_open(2). SEE ALSO
cap_enter(2), cap_fcntls_limit(2), cap_getmode(2), cap_ioctls_limit(2), cap_rights_limit(2), fchmod(2), open(2), pdfork(2), pdgetpid(2), pdkill(2), pdwait4(2), read(2), shm_open(2), write(2), cap_rights_get(3), libcapsicum(3), procdesc(4), casperd(8) HISTORY
Capsicum first appeared in FreeBSD 9.0, and was developed at the University of Cambridge. AUTHORS
Capsicum was developed by Robert Watson <> and Jonathan Anderson <> at the University of Cambridge, and Ben Laurie <> and Kris Kennaway <> at Google, Inc., and Pawel Jakub Dawidek <>. BUGS
Capsicum is considered experimental in FreeBSD. BSD
October 19, 2013 BSD

Check Out this Related Man Page

CAP_RIGHTS_GET(3)					   BSD Library Functions Manual 					 CAP_RIGHTS_GET(3)

cap_rights_get -- obtain capability rights LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/capsicum.h> int cap_rights_get(int fd, cap_rights_t *rights); DESCRIPTION
The cap_rights_get function allows to obtain current capability rights for the given descriptor. The function will fill the rights argument with all capability rights if they were not limited or capability rights configured during the last successful call of cap_rights_limit(2) on the given descriptor. The rights argument can be inspected using cap_rights_init(3) family of functions. The complete list of the capability rights can be found in the rights(4) manual page. RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. EXAMPLES
The following example demonstrates how to limit file descriptor capability rights and how to obtain them. cap_rights_t setrights, getrights; int fd; memset(&setrights, 0, sizeof(setrights)); memset(&getrights, 0, sizeof(getrights)); fd = open("/tmp/foo", O_RDONLY); if (fd < 0) err(1, "open() failed"); cap_rights_init(&setrights, CAP_FSTAT, CAP_READ); if (cap_rights_limit(fd, &setrights) < 0 && errno != ENOSYS) err(1, "cap_rights_limit() failed"); if (cap_rights_get(fd, &getrights) < 0 && errno != ENOSYS) err(1, "cap_rights_get() failed"); assert(memcmp(&setrights, &getrights, sizeof(setrights)) == 0); ERRORS
cap_rights_get() succeeds unless: [EBADF] The fd argument is not a valid active descriptor. [EFAULT] The rights argument points at an invalid address. SEE ALSO
cap_rights_limit(2), errno(2), open(2), assert(3), cap_rights_init(3), err(3), memcmp(3), memset(3), capsicum(4), rights(4) HISTORY
Support for capabilities and capabilities mode was developed as part of the TrustedBSD Project. AUTHORS
This function was created by Pawel Jakub Dawidek <> under sponsorship of the FreeBSD Foundation. BSD
March 27, 2014 BSD

Featured Tech Videos