Manual Reference Pages - CAP_GETMODE (2)
- Capability mode system calls
cap_getmode u_int *modep
places the current process into capability mode, a mode of execution in which
processes may only issue system calls operating on file descriptors or
reading limited global system state.
Access to global name spaces, such as file system or IPC name spaces, is
If the process is already in a capability mode sandbox, the system call is a
Future process descendants created with
will be placed in capability mode from inception.
When combined with
may be used to create kernel-enforced sandboxes in which
appropriately-crafted applications or application components may be run.
returns a flag indicating whether or not the process is in a capability mode
Creating effective process sandboxes is a tricky process that involves
identifying the least possible rights required by the process and then
passing those rights into the process in a safe manner.
should also be aware of other inherited rights, such as access to VM
resources, memory contents, and other process properties that should be
It is advisable to use
to create a runtime environment inside the sandbox that has as few implicitly
acquired rights as possible.
.Rv -std cap_enter cap_getmode
will fail if:
The kernel is compiled without:
.Cd options CAPABILITY_MODE
system call may also return the following error:
points outside the processs allocated address space.
Support for capabilities and capabilities mode was developed as part of the
These functions and the capability facility were created by
.An Robert N. M. Watson
at the University of Cambridge Computer Laboratory with support from a grant
from Google, Inc.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.