[PATCH v3 1/2] capability: add cap_isidentical

Alexey Dobriyan adobriyan at gmail.com
Tue Feb 28 20:04:16 UTC 2023


> +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;
> +}

capability_eq() maybe? "isidentical" is kind of ugly.



More information about the Linux-security-module-archive mailing list