| /linux/security/apparmor/ |
| H A D | policy.c | 343 struct aa_profile *aa_alloc_profile(const char *hname, struct aa_proxy *proxy, in aa_alloc_profile() argument 356 if (!aa_policy_init(&profile->base, NULL, hname, gfp)) in aa_alloc_profile() 376 profile->label.hname = profile->base.hname; in aa_alloc_profile() 492 const char *hname) in __lookup_parent() argument 500 for (split = strstr(hname, "//"); split;) { in __lookup_parent() 501 profile = __strn_find_child(&policy->profiles, hname, in __lookup_parent() 502 split - hname); in __lookup_parent() 506 hname = split + 2; in __lookup_parent() 507 split = strstr(hname, "//"); in __lookup_parent() 526 const char *hname, in __create_missing_ancestors() argument [all …]
|
| H A D | policy_ns.c | 77 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name() 174 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument 179 for (split = strnstr(hname, "//", n); split; in __aa_lookupn_ns() 180 split = strnstr(hname, "//", n)) { in __aa_lookupn_ns() 181 ns = __aa_findn_ns(&ns->sub_ns, hname, split - hname); in __aa_lookupn_ns() 185 n -= split + 2 - hname; in __aa_lookupn_ns() 186 hname = split + 2; in __aa_lookupn_ns() 190 return __aa_findn_ns(&ns->sub_ns, hname, n); in __aa_lookupn_ns() 226 ns = alloc_ns(parent->base.hname, name); in __aa_create_ns()
|
| H A D | lib.c | 482 char *hname; in aa_policy_init() local 487 hname = aa_str_alloc(hname_sz, gfp); in aa_policy_init() 488 if (!hname) in aa_policy_init() 491 scnprintf(hname, hname_sz, "%s//%s", prefix, name); in aa_policy_init() 493 strscpy(hname, name, hname_sz); in aa_policy_init() 494 policy->hname = hname; in aa_policy_init() 496 policy->name = basename(policy->hname); in aa_policy_init() 513 aa_put_str(policy->hname); in aa_policy_destroy()
|
| H A D | label.c | 113 AA_BUG(!a->base.hname); in ns_cmp() 114 AA_BUG(!b->base.hname); in ns_cmp() 123 return strcmp(a->base.hname, b->base.hname); in ns_cmp() 143 AA_BUG(!a->base.hname); in profile_cmp() 144 AA_BUG(!b->base.hname); in profile_cmp() 146 if (a == b || a->base.hname == b->base.hname) in profile_cmp() 152 return strcmp(a->base.hname, b->base.hname); in profile_cmp() 329 aa_put_str(label->hname); in aa_label_destroy() 1261 return aa_dfa_match(rules->policy->dfa, state, tp->base.hname); in match_component() 1268 return aa_dfa_match(rules->policy->dfa, state, tp->base.hname); in match_component() [all …]
|
| H A D | audit.c | 125 profile->ns->base.hname); in audit_pre() 128 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
|
| H A D | domain.c | 102 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component() 109 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component() 641 profile->base.hname, old_info); in x_to_label() 738 __func__, profile->base.hname, info); in profile_transition() 1092 name, hat ? hat->base.hname : NULL, in build_change_hat()
|
| H A D | af_unix.c | 185 peer->base.hname); in match_label()
|
| H A D | policy_unpack.c | 73 ad.name = new->base.hname; in audit_iface()
|
| /linux/security/apparmor/include/ |
| H A D | lib.h | 190 __counted char *hname; member 201 static inline const char *basename(const char *hname) in basename() argument 205 hname = strim((char *)hname); in basename() 206 for (split = strstr(hname, "//"); split; split = strstr(hname, "//")) in basename() 207 hname = split + 2; in basename() 209 return hname; in basename()
|
| H A D | policy.h | 291 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname) 302 struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
|
| H A D | policy_ns.h | 90 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n);
|
| H A D | label.h | 132 __counted char *hname; member
|