Lines Matching refs:profile
326 struct aa_profile *profile; in aa_label_destroy() local
331 label_for_each(i, label, profile) { in aa_label_destroy()
332 aa_put_profile(profile); in aa_label_destroy()
1253 static inline aa_state_t match_component(struct aa_profile *profile, in match_component() argument
1260 if (profile->ns == tp->ns) in match_component()
1264 ns_name = aa_ns_name(profile->ns, tp->ns, true); in match_component()
1287 static int label_compound_match(struct aa_profile *profile, in label_compound_match() argument
1298 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_compound_match()
1300 state = match_component(profile, rules, tp, state); in label_compound_match()
1312 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_compound_match()
1315 state = match_component(profile, rules, tp, state); in label_compound_match()
1320 aa_apply_modes_to_perms(profile, perms); in label_compound_match()
1347 static int label_components_match(struct aa_profile *profile, in label_components_match() argument
1360 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_components_match()
1362 state = match_component(profile, rules, tp, start); in label_components_match()
1373 aa_apply_modes_to_perms(profile, &tmp); in label_components_match()
1376 if (!aa_ns_visible(profile->ns, tp->ns, subns)) in label_components_match()
1378 state = match_component(profile, rules, tp, start); in label_components_match()
1382 aa_apply_modes_to_perms(profile, &tmp); in label_components_match()
1408 int aa_label_match(struct aa_profile *profile, struct aa_ruleset *rules, in aa_label_match() argument
1412 int error = label_compound_match(profile, rules, label, state, subns, in aa_label_match()
1418 return label_components_match(profile, rules, label, state, subns, in aa_label_match()
1503 struct aa_profile *profile, int flags, in aa_profile_snxprint() argument
1509 AA_BUG(!profile); in aa_profile_snxprint()
1512 view = profiles_ns(profile); in aa_profile_snxprint()
1514 if (view != profile->ns && in aa_profile_snxprint()
1515 (!prev_ns || (*prev_ns != profile->ns))) { in aa_profile_snxprint()
1517 *prev_ns = profile->ns; in aa_profile_snxprint()
1518 ns_name = aa_ns_name(view, profile->ns, in aa_profile_snxprint()
1527 if ((flags & FLAG_SHOW_MODE) && profile != profile->ns->unconfined) { in aa_profile_snxprint()
1528 const char *modestr = aa_profile_mode_names[profile->mode]; in aa_profile_snxprint()
1532 profile->base.hname, modestr); in aa_profile_snxprint()
1533 return snprintf(str, size, "%s (%s)", profile->base.hname, in aa_profile_snxprint()
1539 profile->base.hname); in aa_profile_snxprint()
1540 return snprintf(str, size, "%s", profile->base.hname); in aa_profile_snxprint()
1546 struct aa_profile *profile; in label_modename() local
1550 label_for_each(i, label, profile) { in label_modename()
1551 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) { in label_modename()
1553 if (profile == profile->ns->unconfined) in label_modename()
1560 mode = profile->mode; in label_modename()
1561 else if (mode != profile->mode) in label_modename()
1580 struct aa_profile *profile; in display_mode() local
1583 label_for_each(i, label, profile) { in display_mode()
1584 if (aa_ns_visible(ns, profile->ns, in display_mode()
1586 profile != profile->ns->unconfined) in display_mode()
1616 struct aa_profile *profile; in aa_label_snxprint() local
1633 label_for_each(i, label, profile) { in aa_label_snxprint()
1634 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) { in aa_label_snxprint()
1639 len = aa_profile_snxprint(str, size, ns, profile, in aa_label_snxprint()
1863 DEFINE_VEC(profile, vec); in aa_label_strn_parse()
1886 error = vec_setup(profile, vec, len, gfp); in aa_label_strn_parse()
1933 vec_cleanup(profile, vec, len); in aa_label_strn_parse()