diff --git a/sys/kern/subr_capability.c b/sys/kern/subr_capability.c --- a/sys/kern/subr_capability.c +++ b/sys/kern/subr_capability.c @@ -93,6 +93,7 @@ const cap_rights_t cap_pdkill_rights = CAP_RIGHTS_INITIALIZER(CAP_PDKILL); const cap_rights_t cap_pdwait_rights = CAP_RIGHTS_INITIALIZER(CAP_PDWAIT); const cap_rights_t cap_pread_rights = CAP_RIGHTS_INITIALIZER(CAP_PREAD); +const cap_rights_t cap_ptrace_rights = CAP_RIGHTS_INITIALIZER(CAP_PTRACE); const cap_rights_t cap_pwrite_rights = CAP_RIGHTS_INITIALIZER(CAP_PWRITE); const cap_rights_t cap_read_rights = CAP_RIGHTS_INITIALIZER(CAP_READ); const cap_rights_t cap_recv_rights = CAP_RIGHTS_INITIALIZER(CAP_RECV); diff --git a/sys/sys/caprights.h b/sys/sys/caprights.h --- a/sys/sys/caprights.h +++ b/sys/sys/caprights.h @@ -95,6 +95,7 @@ extern const cap_rights_t cap_pdkill_rights; extern const cap_rights_t cap_pdwait_rights; extern const cap_rights_t cap_pread_rights; +extern const cap_rights_t cap_ptrace_rights; extern const cap_rights_t cap_pwrite_rights; extern const cap_rights_t cap_read_rights; extern const cap_rights_t cap_recv_rights; diff --git a/sys/sys/capsicum.h b/sys/sys/capsicum.h --- a/sys/sys/capsicum.h +++ b/sys/sys/capsicum.h @@ -299,7 +299,9 @@ /* Allows pddupfd(2). */ #define CAP_PDDUPFD CAPRIGHT(1, 0x0000000000800000ULL) -#define CAP_UNUSED1_25 CAPRIGHT(1, 0x0000000001000000ULL) +/* Allows ptrace(PT_PROCDESC) */ +#define CAP_PTRACE CAPRIGHT(1, 0x0000000001000000ULL) + #define CAP_UNUSED1_26 CAPRIGHT(1, 0x0000000002000000ULL) #define CAP_UNUSED1_27 CAPRIGHT(1, 0x0000000004000000ULL) #define CAP_UNUSED1_28 CAPRIGHT(1, 0x0000000008000000ULL) @@ -333,8 +335,8 @@ #define CAP_UNUSED1_56 CAPRIGHT(1, 0x0080000000000000ULL) #define CAP_UNUSED1_57 CAPRIGHT(1, 0x0100000000000000ULL) -/* All used bits for index 1. */ -#define CAP_ALL1 CAPRIGHT(1, 0x0000000000FFFFFFULL) +/* All default bits for index 1. */ +#define CAP_ALL1 CAPRIGHT(1, 0x0000000001FFFFFFULL) /* Backward compatibility. */ #define CAP_POLL_EVENT CAP_EVENT