add has_cap_ipc_lock()

This commit is contained in:
NAKAMURA Gou
2016-03-18 14:40:36 +09:00
parent e8be52a1ff
commit 798f69bceb

View File

@ -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) */