add has_cap_sys_admin()

This commit is contained in:
NAKAMURA Gou
2016-03-23 18:08:49 +09:00
parent b3ae7f46bd
commit b214fc278a

View File

@@ -570,6 +570,11 @@ struct process_vm {
long currss;
};
static inline int has_cap_sys_admin(struct thread *th)
{
/* CAP_SYS_ADMIN (= 21) */
return !(th->proc->euid);
}
void hold_address_space(struct address_space *);
void release_address_space(struct address_space *);