summaryrefslogtreecommitdiffstats
path: root/sys/sys/ucred.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2011-03-01 13:23:37 +0000
committerrwatson <rwatson@FreeBSD.org>2011-03-01 13:23:37 +0000
commit6894aabcb5bf68abef0875992b3fef1fde3f7c0a (patch)
treed773ba10cfdbd686d9589ba5d6bfce8bdd97f0d1 /sys/sys/ucred.h
parent0fbd4a42792bb396f7a17bd8ed9eea61339f2d5b (diff)
downloadFreeBSD-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/ucred.h')
-rw-r--r--sys/sys/ucred.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h
index a8934ce..4e2ca02 100644
--- a/sys/sys/ucred.h
+++ b/sys/sys/ucred.h
@@ -70,6 +70,11 @@ struct ucred {
#define XU_NGROUPS 16
/*
+ * Flags for cr_flags.
+ */
+#define CRED_FLAG_CAPMODE 0x00000001 /* In capability mode. */
+
+/*
* This is the external representation of struct ucred.
*/
struct xucred {
OpenPOWER on IntegriCloud