capability_quintet_mangle() can be called with capability sets
containing unknown capabilities. Let's not crash when this is the
case but instead ignore the unknown capabilities.
Fixes
d5e12dc75e0e356c62e514e9c347efb200fe60e0
combined = q->effective | q->bounding | q->inheritable | q->permitted | q->ambient;
- BIT_FOREACH(i, combined) {
- assert((unsigned) i <= cap_last_cap());
+ for (unsigned i = 0; i <= cap_last_cap(); i++) {
+ if (!BIT_SET(combined, i))
+ continue;
if (prctl(PR_CAPBSET_READ, (unsigned long) i) > 0)
continue;
# Assorted tests
systemd-nspawn --directory="$root" --suppress-sync=yes bash -xec 'echo hello'
systemd-nspawn --capability=help
+ systemd-nspawn --directory="$root" --capability=all bash -xec 'echo hello'
systemd-nspawn --resolv-conf=help
systemd-nspawn --timezone=help