void mac_init_port_label(struct label *l) { mac_init_label(l); MAC_PERFORM (init_port_label, l); }
static int mac_labelzone_ctor(void *mem, int size, void *arg, int flags) { struct label *label; KASSERT(size == sizeof(*label), ("mac_labelzone_ctor: wrong size\n")); label = mem; mac_init_label(label); return (0); }
int mac_mbuf_tag_init(struct m_tag *tag, int flag) { struct label *label; int error; label = (struct label *) (tag + 1); mac_init_label(label); if (flag & M_WAITOK) MAC_POLICY_CHECK(mbuf_init_label, label, flag); else MAC_POLICY_CHECK_NOSLEEP(mbuf_init_label, label, flag); if (error) { MAC_POLICY_PERFORM_NOSLEEP(mbuf_destroy_label, label); mac_destroy_label(label); } return (error); }