提交 a4eecbae 编写于 作者: M Mateusz Guzik 提交者: Linus Torvalds

capability: add cap_isidentical

Signed-off-by: NMateusz Guzik <mjguzik@gmail.com>
Reviewed-by: NSerge Hallyn <serge@hallyn.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 10383068
......@@ -157,6 +157,16 @@ static inline bool cap_isclear(const kernel_cap_t a)
return true;
}
static inline bool cap_isidentical(const kernel_cap_t a, const kernel_cap_t b)
{
unsigned __capi;
CAP_FOR_EACH_U32(__capi) {
if (a.cap[__capi] != b.cap[__capi])
return false;
}
return true;
}
/*
* Check if "a" is a subset of "set".
* return true if ALL of the capabilities in "a" are also in "set"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册