Lines Matching refs:label
9 * AppArmor allocates a unique secid for every label used. If a label
10 * is replaced it receives the secid of the label it is replacing.
23 #include "include/label.h"
27 * secids - do not pin labels with a refcount. They rely on the label
39 * TODO: use secid_update in label replace
43 * aa_secid_update - update a secid mapping to a new label
45 * @label: label the secid will now map to
47 void aa_secid_update(u32 secid, struct aa_label *label)
52 __xa_store(&aa_secids, secid, label, 0);
57 * see label for inverse aa_label_to_secid
67 struct aa_label *label = aa_secid_to_label(secid);
73 if (!label)
80 len = aa_label_asxprint(secdata, root_ns, label,
83 len = aa_label_snxprint(NULL, 0, root_ns, label, flags);
95 struct aa_label *label;
97 label = aa_label_strn_parse(&root_ns->unconfined->label, secdata,
99 if (IS_ERR(label))
100 return PTR_ERR(label);
101 *secid = label->secid;
113 * @label: the label to allocate a secid for
116 * Returns: 0 with @label->secid initialized
117 * <0 returns error with @label->secid set to AA_SECID_INVALID
119 int aa_alloc_secid(struct aa_label *label, gfp_t gfp)
125 ret = __xa_alloc(&aa_secids, &label->secid, label,
130 label->secid = AA_SECID_INVALID;