HomeFreeBSD

jail: Consistently handle the pr_allow bitmask

Description

jail: Consistently handle the pr_allow bitmask

Return a boolean (i.e. 0 or 1) from prison_allow, instead of the flag
value itself, which is what sysctl expects.

Add prison_set_allow(), which can set or clear a permission bit, and
propagates cleared bits down to child jails.

Use prison_allow() and prison_set_allow() in the various jail.allow.*
sysctls, and others that depend on thoe permissions.

Add locking around checking both pr_allow and pr_enforce_statfs in
prison_priv_check().

Details

Provenance
jamieAuthored on Dec 27 2020, 4:25 AM
Parents
rG43c273489523: jail: Make comments on struct prison locking more precise
Branches
Unknown
Tags
Unknown