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
39 * TODO: use secid_update in label replace
43 * see label for inverse aa_label_to_secid
50 static int apparmor_label_to_secctx(struct aa_label *label, in apparmor_label_to_secctx() argument
57 if (!label) in apparmor_label_to_secctx()
64 len = aa_label_asxprint(&cp->context, root_ns, label, in apparmor_label_to_secctx()
67 len = aa_label_snxprint(NULL, 0, root_ns, label, flags); in apparmor_label_to_secctx()
82 struct aa_label *label = aa_secid_to_label(secid); in apparmor_secid_to_secctx() local
84 return apparmor_label_to_secctx(label, cp); in apparmor_secid_to_secctx()
89 struct aa_label *label; in apparmor_lsmprop_to_secctx() local
91 label = prop->apparmor.label; in apparmor_lsmprop_to_secctx()
93 return apparmor_label_to_secctx(label, cp); in apparmor_lsmprop_to_secctx()
98 struct aa_label *label; in apparmor_secctx_to_secid() local
100 label = aa_label_strn_parse(&root_ns->unconfined->label, secdata, in apparmor_secctx_to_secid()
102 if (IS_ERR(label)) in apparmor_secctx_to_secid()
103 return PTR_ERR(label); in apparmor_secctx_to_secid()
104 *secid = label->secid; in apparmor_secctx_to_secid()
120 * @label: the label to allocate a secid for
123 * Returns: 0 with @label->secid initialized
124 * <0 returns error with @label->secid set to AA_SECID_INVALID
126 int aa_alloc_secid(struct aa_label *label, gfp_t gfp) in aa_alloc_secid() argument
132 ret = __xa_alloc(&aa_secids, &label->secid, label, in aa_alloc_secid()
137 label->secid = AA_SECID_INVALID; in aa_alloc_secid()