Lines Matching full:pr
66 * successful, since we're also setting pr->pr_label. On error, it remains
70 mac_prison_init(struct prison *pr, int flag) in mac_prison_init() argument
74 mtx_assert(&pr->pr_mtx, MA_NOTOWNED); in mac_prison_init()
76 mtx_lock(&pr->pr_mtx); in mac_prison_init()
77 pr->pr_label = NULL; in mac_prison_init()
88 mtx_lock(&pr->pr_mtx); in mac_prison_init()
89 pr->pr_label = prlabel; in mac_prison_init()
94 mac_prison_destroy(struct prison *pr) in mac_prison_destroy() argument
96 mtx_assert(&pr->pr_mtx, MA_OWNED); in mac_prison_destroy()
99 MAC_POLICY_PERFORM_NOSLEEP(prison_cleanup, curthread->td_ucred, pr); in mac_prison_destroy()
100 mac_prison_label_free(pr->pr_label); in mac_prison_destroy()
101 pr->pr_label = NULL; in mac_prison_destroy()
131 mac_prison_relabel(struct ucred *cred, struct prison *pr, in mac_prison_relabel() argument
134 mtx_assert(&pr->pr_mtx, MA_OWNED); in mac_prison_relabel()
135 MAC_POLICY_PERFORM_NOSLEEP(prison_relabel, cred, pr, pr->pr_label, in mac_prison_relabel()
140 mac_prison_label_set(struct ucred *cred, struct prison *pr, in mac_prison_label_set() argument
145 mtx_assert(&pr->pr_mtx, MA_OWNED); in mac_prison_label_set()
147 error = mac_prison_check_relabel(cred, pr, label); in mac_prison_label_set()
151 mac_prison_relabel(cred, pr, label); in mac_prison_label_set()
159 mac_prison_check_relabel(struct ucred *cred, struct prison *pr, in mac_prison_check_relabel() argument
164 mtx_assert(&pr->pr_mtx, MA_OWNED); in mac_prison_check_relabel()
165 MAC_POLICY_CHECK_NOSLEEP(prison_check_relabel, cred, pr, in mac_prison_check_relabel()
166 pr->pr_label, newlabel); in mac_prison_check_relabel()
167 MAC_CHECK_PROBE4(prison_check_relabel, error, cred, pr, in mac_prison_check_relabel()
168 pr->pr_label, newlabel); in mac_prison_check_relabel()
176 mac_prison_check_attach(struct ucred *cred, struct prison *pr) in mac_prison_check_attach() argument
180 MAC_POLICY_CHECK_NOSLEEP(prison_check_attach, cred, pr, pr->pr_label); in mac_prison_check_attach()
181 MAC_CHECK_PROBE3(prison_check_attach, error, cred, pr, pr->pr_label); in mac_prison_check_attach()
203 mac_prison_check_get(struct ucred *cred, struct prison *pr, in mac_prison_check_get() argument
208 MAC_POLICY_CHECK_NOSLEEP(prison_check_get, cred, pr, pr->pr_label, in mac_prison_check_get()
210 MAC_CHECK_PROBE5(prison_check_get, error, cred, pr, pr->pr_label, opts, in mac_prison_check_get()
219 mac_prison_check_set(struct ucred *cred, struct prison *pr, in mac_prison_check_set() argument
224 MAC_POLICY_CHECK_NOSLEEP(prison_check_set, cred, pr, pr->pr_label, in mac_prison_check_set()
226 MAC_CHECK_PROBE5(prison_check_set, error, cred, pr, pr->pr_label, opts, in mac_prison_check_set()
235 mac_prison_check_remove(struct ucred *cred, struct prison *pr) in mac_prison_check_remove() argument
239 MAC_POLICY_CHECK_NOSLEEP(prison_check_remove, cred, pr, pr->pr_label); in mac_prison_check_remove()
240 MAC_CHECK_PROBE3(prison_check_remove, error, cred, pr, pr->pr_label); in mac_prison_check_remove()
246 mac_prison_created(struct ucred *cred, struct prison *pr) in mac_prison_created() argument
249 MAC_POLICY_PERFORM(prison_created, cred, pr, pr->pr_label); in mac_prison_created()
253 mac_prison_attached(struct ucred *cred, struct prison *pr, struct proc *p) in mac_prison_attached() argument
256 MAC_POLICY_PERFORM(prison_attached, cred, pr, pr->pr_label, p, in mac_prison_attached()