From 798f69bceba0d998ee197c33a25e0e4ef0440889 Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Fri, 18 Mar 2016 14:40:36 +0900 Subject: [PATCH] add has_cap_ipc_lock() --- kernel/include/process.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/include/process.h b/kernel/include/process.h index ce122d5f..06a43b1c 100644 --- a/kernel/include/process.h +++ b/kernel/include/process.h @@ -570,6 +570,12 @@ struct process_vm { long currss; }; +static inline int has_cap_ipc_lock(struct thread *th) +{ + /* CAP_IPC_LOCK (= 14) */ + return !(th->proc->euid); +} + static inline int has_cap_sys_admin(struct thread *th) { /* CAP_SYS_ADMIN (= 21) */