Home
last modified time | relevance | path

Searched refs:hname (Results 1 – 11 of 11) sorted by relevance

/linux-6.15/security/apparmor/
H A Dpolicy.c363 profile->label.hname = profile->base.hname; in aa_alloc_profile()
443 const char *hname) in __lookup_parent() argument
457 hname = split + 2; in __lookup_parent()
485 AA_BUG(!hname); in __create_missing_ancestors()
494 const char *name = kstrndup(hname, split - hname, in __create_missing_ancestors()
506 hname = split + 2; in __create_missing_ancestors()
541 hname = split + 2; in __lookupn_profile()
552 return __lookupn_profile(base, hname, strlen(hname)); in __lookup_profile()
916 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
1012 new->base.hname = old->base.hname; in share_name()
[all …]
H A Dlib.c366 char *hname; in aa_policy_init() local
370 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp); in aa_policy_init()
371 if (hname) in aa_policy_init()
372 sprintf(hname, "%s//%s", prefix, name); in aa_policy_init()
374 hname = aa_str_alloc(strlen(name) + 1, gfp); in aa_policy_init()
375 if (hname) in aa_policy_init()
376 strcpy(hname, name); in aa_policy_init()
378 if (!hname) in aa_policy_init()
380 policy->hname = hname; in aa_policy_init()
382 policy->name = basename(policy->hname); in aa_policy_init()
[all …]
H A Dpolicy_ns.c77 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 Dlabel.c113 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()
325 aa_put_str(label->hname); in aa_label_destroy()
1448 label->hname = name; in aa_update_label_name()
1534 profile->base.hname); in aa_profile_snxprint()
[all …]
H A Daudit.c125 profile->ns->base.hname); in audit_pre()
128 audit_log_untrustedstring(ab, profile->base.hname); in audit_pre()
H A Ddomain.c97 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component()
104 return aa_dfa_match(rules->file->dfa, state, tp->base.hname); in match_component()
1035 name, hat ? hat->base.hname : NULL, in build_change_hat()
H A Dpolicy_unpack.c72 ad.name = new->base.hname; in audit_iface()
/linux-6.15/security/apparmor/include/
H A Dlib.h147 __counted char *hname; member
158 static inline const char *basename(const char *hname) in basename() argument
162 hname = strim((char *)hname); in basename()
163 for (split = strstr(hname, "//"); split; split = strstr(hname, "//")) in basename()
164 hname = split + 2; in basename()
166 return hname; in basename()
H A Dpolicy.h254 #define name_is_shared(A, B) ((A)->hname && (A)->hname == (B)->hname)
265 struct aa_profile *aa_lookupn_profile(struct aa_ns *ns, const char *hname,
H A Dpolicy_ns.h90 struct aa_ns *__aa_lookupn_ns(struct aa_ns *view, const char *hname, size_t n);
H A Dlabel.h128 __counted char *hname; member