Lines Matching full: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
38 * TODO: use secid_update in label replace
42 * aa_secid_update - update a secid mapping to a new label
44 * @label: label the secid will now map to
46 void aa_secid_update(u32 secid, struct aa_label *label) in aa_secid_update() argument
51 idr_replace(&aa_secids, label, secid); in aa_secid_update()
57 * see label for inverse aa_label_to_secid
61 struct aa_label *label; in aa_secid_to_label() local
64 label = idr_find(&aa_secids, secid); in aa_secid_to_label()
67 return label; in aa_secid_to_label()
73 struct aa_label *label = aa_secid_to_label(secid); in apparmor_secid_to_secctx() local
78 if (!label) in apparmor_secid_to_secctx()
82 len = aa_label_asxprint(secdata, root_ns, label, in apparmor_secid_to_secctx()
87 len = aa_label_snxprint(NULL, 0, root_ns, label, in apparmor_secid_to_secctx()
100 struct aa_label *label; in apparmor_secctx_to_secid() local
102 label = aa_label_strn_parse(&root_ns->unconfined->label, secdata, in apparmor_secctx_to_secid()
104 if (IS_ERR(label)) in apparmor_secctx_to_secid()
105 return PTR_ERR(label); in apparmor_secctx_to_secid()
106 *secid = label->secid; in apparmor_secctx_to_secid()
118 * @label: the label to allocate a secid for
121 * Returns: 0 with @label->secid initialized
122 * <0 returns error with @label->secid set to AA_SECID_INVALID
124 int aa_alloc_secid(struct aa_label *label, gfp_t gfp) in aa_alloc_secid() argument
131 ret = idr_alloc(&aa_secids, label, AA_FIRST_SECID, 0, GFP_ATOMIC); in aa_alloc_secid()
136 label->secid = AA_SECID_INVALID; in aa_alloc_secid()
141 label->secid = ret; in aa_alloc_secid()