capability-util: make CAPABILITY_QUINTET_NULL const, introduce capability_quintet_is_fully_set() helper
Follow-up for1184626a26See9bb64f1b8dfor rationale of the first change.
This commit is contained in:
@@ -661,11 +661,7 @@ int pidref_get_capability(const PidRef *pidref, CapabilityQuintet *ret) {
|
||||
}
|
||||
}
|
||||
|
||||
if (q.effective == CAP_MASK_UNSET ||
|
||||
q.inheritable == CAP_MASK_UNSET ||
|
||||
q.permitted == CAP_MASK_UNSET ||
|
||||
q.effective == CAP_MASK_UNSET ||
|
||||
q.ambient == CAP_MASK_UNSET)
|
||||
if (!capability_quintet_is_fully_set(&q))
|
||||
return -EBADMSG;
|
||||
|
||||
r = pidref_verify(pidref);
|
||||
|
||||
Reference in New Issue
Block a user