Lines Matching defs:label
34 #include "include/label.h"
415 struct aa_label *label;
418 label = begin_current_label_crit_section();
423 error = aa_may_manage_policy(label, ns, mask);
430 error = aa_replace_profiles(ns, label, mask, data);
434 end_current_label_crit_section(label);
478 struct aa_label *label;
482 label = begin_current_label_crit_section();
486 error = aa_may_manage_policy(label, ns, AA_MAY_REMOVE_POLICY);
499 error = aa_remove_profiles(ns, label, data->data, size);
503 end_current_label_crit_section(label);
664 struct aa_label *label, *curr;
683 label = aa_label_parse(curr, query, GFP_KERNEL, false, false);
685 if (IS_ERR(label))
686 return PTR_ERR(label);
700 label_for_each_confined(i, label, profile) {
710 aa_put_label(label);
721 aa_put_label(label);
732 * query_label - queries a label and writes permissions to buf
743 * the name of the label, in the current namespace, that is to be queried and
744 * DFA_STRING is a binary string to match against the label(s)'s DFA.
755 struct aa_label *label, *curr;
779 label = aa_label_parse(curr, label_name, GFP_KERNEL, false, false);
781 if (IS_ERR(label))
782 return PTR_ERR(label);
786 label_for_each_in_ns(i, labels_ns(label), label, profile) {
790 label_for_each(i, label, profile) {
794 aa_put_label(label);
903 #define QUERY_CMD_LABEL "label\0"
920 * sequence. The only queries currently supported are label-based queries for
923 * For permissions queries, ubuf must begin with "label\0", followed by the
1069 struct aa_label *label = aa_get_label_rcu(&proxy->label);
1070 struct aa_profile *profile = labels_profile(label);
1072 aa_put_label(label);
1080 struct aa_label *label = aa_get_label_rcu(&proxy->label);
1081 struct aa_profile *profile = labels_profile(label);
1083 aa_put_label(label);
1091 struct aa_label *label = aa_get_label_rcu(&proxy->label);
1092 struct aa_profile *profile = labels_profile(label);
1099 aa_put_label(label);
1107 struct aa_label *label = aa_get_label_rcu(&proxy->label);
1108 struct aa_profile *profile = labels_profile(label);
1116 aa_put_label(label);
1148 struct aa_label *label;
1150 label = begin_current_label_crit_section();
1151 seq_printf(seq, "%s\n", label->size > 1 ? "yes" : "no");
1152 end_current_label_crit_section(label);
1159 struct aa_label *label;
1164 label = begin_current_label_crit_section();
1166 if (label->size > 1) {
1167 label_for_each(it, label, profile)
1168 if (profile->ns != labels_ns(label)) {
1175 end_current_label_crit_section(label);
1182 struct aa_label *label;
1184 label = begin_current_label_crit_section();
1185 seq_printf(seq, "%d\n", labels_ns(label)->level);
1186 end_current_label_crit_section(label);
1193 struct aa_label *label = begin_current_label_crit_section();
1194 seq_printf(seq, "%s\n", labels_ns(label)->base.name);
1195 end_current_label_crit_section(label);
1553 struct aa_proxy *proxy = aa_get_proxy(profile->label.proxy);
1611 struct aa_label *label;
1619 label = aa_get_label_rcu(&proxy->label);
1620 profile = labels_profile(label);
1623 aa_put_label(label);
1741 profile->label.proxy, NULL, NULL,
1745 aa_get_proxy(profile->label.proxy);
1749 profile->label.proxy, NULL, NULL,
1753 aa_get_proxy(profile->label.proxy);
1757 profile->label.proxy, NULL, NULL,
1761 aa_get_proxy(profile->label.proxy);
1786 struct aa_label *label;
1789 label = begin_current_label_crit_section();
1790 error = aa_may_manage_policy(label, NULL, AA_MAY_LOAD_POLICY);
1791 end_current_label_crit_section(label);
1835 struct aa_label *label;
1838 label = begin_current_label_crit_section();
1839 error = aa_may_manage_policy(label, NULL, AA_MAY_LOAD_POLICY);
1840 end_current_label_crit_section(label);
2260 aa_label_seq_xprint(f, root, &profile->label,
2365 AA_SFS_DIR("label", aa_sfs_entry_query_label),