From 07b1b594056174fc0719e778590f3fcb0225db1c Mon Sep 17 00:00:00 2001 From: Jonathan Anderson Date: Fri, 1 Jul 2011 12:13:48 +0000 Subject: [PATCH] Define cap_rights_t and DTYPE_CAPABILITY, which are required to implement Capsicum capabilities. Approved by: mentor (rwatson), re (bz) --- sys/sys/_types.h | 1 + sys/sys/file.h | 1 + sys/sys/types.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index d71cdb094e1a..c59afd31cb55 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -38,6 +38,7 @@ typedef __uint32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ +typedef __uint64_t __cap_rights_t; /* capability rights */ typedef __uint32_t __fflags_t; /* file flags */ typedef __uint64_t __fsblkcnt_t; typedef __uint64_t __fsfilcnt_t; diff --git a/sys/sys/file.h b/sys/sys/file.h index e4edac9a8165..cc4593b1afae 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -64,6 +64,7 @@ struct socket; #define DTYPE_SEM 9 /* posix semaphore */ #define DTYPE_PTS 10 /* pseudo teletype master device */ #define DTYPE_DEV 11 /* Device specific fd type */ +#define DTYPE_CAPABILITY 12 /* capability */ #ifdef _KERNEL diff --git a/sys/sys/types.h b/sys/sys/types.h index cb513afeb5ee..1b994d31a01d 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -89,6 +89,8 @@ typedef __blkcnt_t blkcnt_t; #define _BLKCNT_T_DECLARED #endif +typedef __cap_rights_t cap_rights_t; + #ifndef _CLOCK_T_DECLARED typedef __clock_t clock_t; #define _CLOCK_T_DECLARED