Lines Matching defs:profile

29  *   profiles - each profile is a label
74 /* requires profile list write lock held */
129 * profile_cmp - profile comparison for set ordering
130 * @a: profile to compare (NOT NULL)
131 * @b: profile to compare (NOT NULL)
210 /* size == 1 is a profile and flags must be set as part of creation */
328 struct aa_profile *profile;
333 label_for_each(i, label, profile) {
334 aa_put_profile(profile);
426 * aa_label_alloc - allocate a label with a profile vector of @size length
427 * @size: size of profile vector in the label
501 * __aa_label_next_not_in_set - return the next profile of @sub not in @set
506 * Returns: profile in @sub that is not in @set, with iterator set pos after
566 * @sub contains an unconfined profile that does not have a matching
949 * aa_label_next_in_merge - find the next profile when merging @a and @b
954 * Returns: next profile
1252 /* match a profile and its associated ns component if needed
1254 * If a subns profile is not to be matched should be prescreened with
1257 static inline aa_state_t match_component(struct aa_profile *profile,
1264 if (profile->ns == tp->ns)
1267 /* try matching with namespace name and then profile */
1268 ns_name = aa_ns_name(profile->ns, tp->ns, true);
1277 * @profile: profile to find perms for
1291 static int label_compound_match(struct aa_profile *profile,
1302 if (!aa_ns_visible(profile->ns, tp->ns, inview))
1304 state = match_component(profile, rules, tp, state);
1316 if (!aa_ns_visible(profile->ns, tp->ns, inview))
1319 state = match_component(profile, rules, tp, state);
1333 * @profile: profile to find perms for
1347 static int label_components_match(struct aa_profile *profile,
1360 if (!aa_ns_visible(profile->ns, tp->ns, inview))
1362 state = match_component(profile, rules, tp, start);
1375 if (!aa_ns_visible(profile->ns, tp->ns, inview))
1377 state = match_component(profile, rules, tp, start);
1396 * @profile: profile to match against (NOT NULL)
1406 int aa_label_match(struct aa_profile *profile, struct aa_ruleset *rules,
1410 aa_state_t tmp = label_compound_match(profile, rules, label, state,
1417 return label_components_match(profile, rules, label, state, inview,
1488 * aa_profile_snxprint - print a profile name to a buffer
1491 * @view: namespace profile is being viewed from
1492 * @profile: profile to view (NOT NULL)
1499 * Note: will not print anything if the profile is not visible
1502 struct aa_profile *profile, int flags,
1508 AA_BUG(!profile);
1511 view = profiles_ns(profile);
1513 if (view != profile->ns &&
1514 (!prev_ns || (*prev_ns != profile->ns))) {
1516 *prev_ns = profile->ns;
1517 ns_name = aa_ns_name(view, profile->ns,
1526 if ((flags & FLAG_SHOW_MODE) && profile != profile->ns->unconfined) {
1527 const char *modestr = aa_profile_mode_names[profile->mode];
1531 profile->base.hname, modestr);
1532 return snprintf(str, size, "%s (%s)", profile->base.hname,
1538 profile->base.hname);
1539 return snprintf(str, size, "%s", profile->base.hname);
1545 struct aa_profile *profile;
1549 label_for_each(i, label, profile) {
1550 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {
1552 if (profile == profile->ns->unconfined)
1559 mode = profile->mode;
1560 else if (mode != profile->mode)
1579 struct aa_profile *profile;
1582 label_for_each(i, label, profile) {
1583 if (aa_ns_visible(ns, profile->ns,
1585 profile != profile->ns->unconfined)
1599 * @ns: namespace profile is being viewed from
1615 struct aa_profile *profile;
1632 label_for_each(i, label, profile) {
1633 if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {
1638 len = aa_profile_snxprint(str, size, ns, profile,
1668 * @ns: namespace profile is being viewed from
1697 * @ns: namespace profile is being viewed from
1862 DEFINE_VEC(profile, vec);
1885 error = vec_setup(profile, vec, len, gfp);
1932 vec_cleanup(profile, vec, len);
2038 * while holding the ns_lock will stop profile replacement, removal,