diff options
author | rwatson <rwatson@FreeBSD.org> | 2011-03-01 13:23:37 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2011-03-01 13:23:37 +0000 |
commit | 6894aabcb5bf68abef0875992b3fef1fde3f7c0a (patch) | |
tree | d773ba10cfdbd686d9589ba5d6bfce8bdd97f0d1 /sys/sys/user.h | |
parent | 0fbd4a42792bb396f7a17bd8ed9eea61339f2d5b (diff) | |
download | FreeBSD-src-6894aabcb5bf68abef0875992b3fef1fde3f7c0a.zip FreeBSD-src-6894aabcb5bf68abef0875992b3fef1fde3f7c0a.tar.gz |
Add initial support for Capsicum's Capability Mode to the FreeBSD kernel,
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
Diffstat (limited to 'sys/sys/user.h')
-rw-r--r-- | sys/sys/user.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/user.h b/sys/sys/user.h index b32ca04..5c34c9d 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -101,9 +101,11 @@ #define KI_NGROUPS 16 /* number of groups in ki_groups */ #define LOGNAMELEN 17 /* size of returned ki_login */ +/* Flags for the process credential. */ +#define KI_CRF_CAPABILITY_MODE 0x00000001 /* - * Steal a bit from ki_cr_flags (cr_flags is never used) to indicate - * that the cred had more than KI_NGROUPS groups. + * Steal a bit from ki_cr_flags to indicate that the cred had more than + * KI_NGROUPS groups. */ #define KI_CRF_GRP_OVERFLOW 0x80000000 |