MCPcopy Create free account
hub / github.com/F-Stack/f-stack / prison_set_allow

Function prison_set_allow

freebsd/kern/kern_jail.c:2900–2911  ·  view source on GitHub ↗

* Set or clear a permission bit in the pr_allow field, passing restrictions * (cleared permission) down to child jails. */

Source from the content-addressed store, hash-verified

2898 * (cleared permission) down to child jails.
2899 */
2900void
2901prison_set_allow(struct ucred *cred, unsigned flag, int enable)
2902{
2903 struct prison *pr;
2904
2905 pr = cred->cr_prison;
2906 sx_slock(&allprison_lock);
2907 mtx_lock(&pr->pr_mtx);
2908 prison_set_allow_locked(pr, flag, enable);
2909 mtx_unlock(&pr->pr_mtx);
2910 sx_sunlock(&allprison_lock);
2911}
2912
2913static void
2914prison_set_allow_locked(struct prison *pr, unsigned flag, int enable)

Callers 2

Calls 3

prison_set_allow_lockedFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected