/Linux-v4.19/security/apparmor/ |
D | policy.c | 258 struct aa_profile *aa_alloc_profile(const char *hname, struct aa_proxy *proxy, in aa_alloc_profile() argument 269 if (!aa_policy_init(&profile->base, NULL, hname, gfp)) in aa_alloc_profile() 283 profile->label.hname = profile->base.hname; in aa_alloc_profile() 363 const char *hname) in __lookup_parent() argument 371 for (split = strstr(hname, "//"); split;) { in __lookup_parent() 372 profile = __strn_find_child(&policy->profiles, hname, in __lookup_parent() 373 split - hname); in __lookup_parent() 377 hname = split + 2; in __lookup_parent() 378 split = strstr(hname, "//"); in __lookup_parent() 398 const char *hname, size_t n) in __lookupn_profile() argument [all …]
|
D | policy_ns.c | 78 return view->base.hname + strlen(curr->base.hname) + 2; in aa_ns_name() 128 kzfree(ns->base.hname); in alloc_ns() 204 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n) in __aa_lookupn_ns() argument 209 for (split = strnstr(hname, "//", n); split; in __aa_lookupn_ns() 210 split = strnstr(hname, "//", n)) { in __aa_lookupn_ns() 211 ns = __aa_findn_ns(&ns->sub_ns, hname, split - hname); in __aa_lookupn_ns() 215 n -= split + 2 - hname; in __aa_lookupn_ns() 216 hname = split + 2; in __aa_lookupn_ns() 220 return __aa_findn_ns(&ns->sub_ns, hname, n); in __aa_lookupn_ns() 256 ns = alloc_ns(parent->base.hname, name); in __aa_create_ns()
|
D | lib.c | 493 char *hname; in aa_policy_init() local 497 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp); in aa_policy_init() 498 if (hname) in aa_policy_init() 499 sprintf(hname, "%s//%s", prefix, name); in aa_policy_init() 501 hname = aa_str_alloc(strlen(name) + 1, gfp); in aa_policy_init() 502 if (hname) in aa_policy_init() 503 strcpy(hname, name); in aa_policy_init() 505 if (!hname) in aa_policy_init() 507 policy->hname = hname; in aa_policy_init() 509 policy->name = basename(policy->hname); in aa_policy_init() [all …]
|
D | label.c | 117 AA_BUG(!a->base.hname); in ns_cmp() 118 AA_BUG(!b->base.hname); in ns_cmp() 127 return strcmp(a->base.hname, b->base.hname); in ns_cmp() 147 AA_BUG(!a->base.hname); in profile_cmp() 148 AA_BUG(!b->base.hname); in profile_cmp() 150 if (a == b || a->base.hname == b->base.hname) in profile_cmp() 156 return strcmp(a->base.hname, b->base.hname); in profile_cmp() 326 aa_put_str(label->hname); in label_destroy() 1252 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component() 1259 return aa_dfa_match(profile->policy.dfa, state, tp->base.hname); in match_component() [all …]
|
D | audit.c | 89 profile->ns->base.hname); in audit_pre() 92 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
|
D | domain.c | 110 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 117 return aa_dfa_match(profile->file.dfa, state, tp->base.hname); in match_component() 1038 name, hat ? hat->base.hname : NULL, in build_change_hat()
|
D | policy_unpack.c | 118 aad(&sa)->name = new->base.hname; in audit_iface()
|
/Linux-v4.19/security/apparmor/include/ |
D | lib.h | 130 __counted char *hname; member 141 static inline const char *basename(const char *hname) in basename() argument 145 hname = strim((char *)hname); in basename() 146 for (split = strstr(hname, "//"); split; split = strstr(hname, "//")) in basename() 147 hname = split + 2; in basename() 149 return hname; in basename()
|
D | policy_ns.h | 96 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n); 158 const char *hname) in __aa_lookup_ns() argument 160 return __aa_lookupn_ns(base, hname, strlen(hname)); in __aa_lookup_ns()
|
D | policy.h | 173 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname) 186 struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
|
D | label.h | 134 __counted char *hname; member
|