summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_capability.c
Commit message (Collapse)AuthorAgeFilesLines
* Add kernel functions to unwrap capabilities.jonathan2011-07-041-0/+122
| | | | | | | | | | | | | | | cap_funwrap() and cap_funwrap_mmap() unwrap capabilities, exposing the underlying object. Attempting to unwrap a capability with an inadequate rights mask (e.g. calling cap_funwrap(fp, CAP_WRITE | CAP_MMAP, &result) on a capability whose rights mask is CAP_READ | CAP_MMAP) will result in ENOTCAPABLE. Unwrapping a non-capability is effectively a no-op. These functions will be used by Capsicum-aware versions of _fget(), etc. Approved by: mentor (rwatson), re (Capsicum blanket) Sponsored by: Google Inc
* We may split today's CAPABILITIES into CAPABILITY_MODE (which hasjonathan2011-06-291-4/+4
| | | | | | | | | | | | | to do with global namespaces) and CAPABILITIES (which has to do with constraining file descriptors). Just in case, and because it's a better name anyway, let's move CAPABILITIES out of the way. Also, change opt_capabilities.h to opt_capsicum.h; for now, this will only hold CAPABILITY_MODE, but it will probably also hold the new CAPABILITIES (implying constrained file descriptors) in the future. Approved by: rwatson Sponsored by: Google UK Ltd
* Remove redundant Capsicum sysctl.jonathan2011-06-251-7/+0
| | | | | | Since we're now declaring FEATURE(security_capabilities), there's no need for an explicit SYSCTL_NODE. Approved by: rwatson
* - Add a FEATURE for capsicum (security_capabilities).netchild2011-03-041-0/+2
| | | | | | - Rename mac FEATURE to security_mac. Discussed with: rwatson
* Add initial support for Capsicum's Capability Mode to the FreeBSD kernel,rwatson2011-03-011-0/+123
compiled conditionally on options CAPABILITIES: Add a new credential flag, CRED_FLAG_CAPMODE, which indicates that a subject (typically a process) is in capability mode. Add two new system calls, cap_enter(2) and cap_getmode(2), which allow setting and querying (but never clearing) the flag. Export the capability mode flag via process information sysctls. Sponsored by: Google, Inc. Reviewed by: anderson Discussed with: benl, kris, pjd Obtained from: Capsicum Project MFC after: 3 months
OpenPOWER on IntegriCloud