nspawn: don't hard fail when setting capabilities
The OCI changes in #9762 broke a use case in which we use nspawn from inside a container that has dropped capabilities from the bounding set that nspawn expected to retain. In an attempt to keep OCI compliance and support our use case, I made hard failing on setting capabilities not in the bounding set optional (hard fail if using OCI and log only if using nspawn cmdline). Fixes #12539
This commit is contained in:
committed by
Lennart Poettering
parent
a5a4dfa1bc
commit
f66ad46066
@@ -69,4 +69,9 @@ static inline bool capability_quintet_is_set(const CapabilityQuintet *q) {
|
||||
q->ambient != (uint64_t) -1;
|
||||
}
|
||||
|
||||
/* Mangles the specified caps quintet taking the current bounding set into account:
|
||||
* drops all caps from all five sets if our bounding set doesn't allow them.
|
||||
* Returns true if the quintet was modified. */
|
||||
bool capability_quintet_mangle(CapabilityQuintet *q);
|
||||
|
||||
int capability_quintet_enforce(const CapabilityQuintet *q);
|
||||
|
||||
Reference in New Issue
Block a user