Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

capability: add cap_isidentical

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mateusz Guzik and committed by
Linus Torvalds
a4eecbae 10383068

+10
+10
include/linux/capability.h
··· 157 157 return true; 158 158 } 159 159 160 + static inline bool cap_isidentical(const kernel_cap_t a, const kernel_cap_t b) 161 + { 162 + unsigned __capi; 163 + CAP_FOR_EACH_U32(__capi) { 164 + if (a.cap[__capi] != b.cap[__capi]) 165 + return false; 166 + } 167 + return true; 168 + } 169 + 160 170 /* 161 171 * Check if "a" is a subset of "set". 162 172 * return true if ALL of the capabilities in "a" are also in "set"