Lines Matching refs:name
97 const char *name, u32 request, in change_profile_perms() argument
112 aa_str_perms(profile->file.dfa, start, name, &cond, &perms); in change_profile_perms()
118 state = aa_dfa_match(profile->file.dfa, start, ns->base.name); in change_profile_perms()
120 aa_str_perms(profile->file.dfa, state, name, &cond, &perms); in change_profile_perms()
139 static struct aa_profile *__attach_match(const char *name, in __attach_match() argument
150 DFA_START, name); in __attach_match()
157 } else if (!strcmp(profile->base.name, name)) in __attach_match()
174 struct list_head *list, const char *name) in find_attach() argument
179 profile = aa_get_profile(__attach_match(name, list)); in find_attach()
208 const char *name; in separate_fqname() local
216 name = *ns_name + strlen(*ns_name) + 1; in separate_fqname()
217 if (!*name) in separate_fqname()
218 name = NULL; in separate_fqname()
221 name = fqname; in separate_fqname()
224 return name; in separate_fqname()
227 static const char *next_name(int xtype, const char *name) in next_name() argument
245 const char *name; in x_table_lookup() local
248 for (name = profile->file.trans.table[index]; !new_profile && name; in x_table_lookup()
249 name = next_name(xtype, name)) { in x_table_lookup()
256 new_profile = aa_find_child(profile, name); in x_table_lookup()
258 } else if (*name == ':') { in x_table_lookup()
261 xname = name = separate_fqname(name, &ns_name); in x_table_lookup()
273 } else if (*name == '@') { in x_table_lookup()
278 xname = name; in x_table_lookup()
301 const char *name, u32 xindex) in x_to_profile() argument
315 name); in x_to_profile()
319 name); in x_to_profile()
349 const char *name = NULL, *target = NULL, *info = NULL; in apparmor_bprm_set_creds() local
370 &name, &info); in apparmor_bprm_set_creds()
375 name = bprm->filename; in apparmor_bprm_set_creds()
388 new_profile = find_attach(ns, &ns->base.profiles, name); in apparmor_bprm_set_creds()
400 state = aa_str_perms(profile->file.dfa, state, name, &cond, &perms); in apparmor_bprm_set_creds()
413 cxt->onexec->base.name, in apparmor_bprm_set_creds()
424 new_profile = x_to_profile(profile, name, perms.xindex); in apparmor_bprm_set_creds()
499 name, new_profile->base.hname); in apparmor_bprm_set_creds()
517 name, target, cond.uid, info, error); in apparmor_bprm_set_creds()
588 char *name = kmalloc(strlen(n1) + strlen(n2) + 3, GFP_KERNEL); in new_compound_name() local
589 if (name) in new_compound_name()
590 sprintf(name, "%s//%s", n1, n2); in new_compound_name()
591 return name; in new_compound_name()
613 char *name = NULL; in aa_change_hat() local
671 name = new_compound_name(root->base.hname, hats[0]); in aa_change_hat()
673 target = name; in aa_change_hat()
703 else if (name && !error) in aa_change_hat()
726 kfree(name); in aa_change_hat()
754 const char *name = NULL, *info = NULL; in aa_change_profile() local
789 name = ns_name; in aa_change_profile()
847 name, hname, GLOBAL_ROOT_UID, info, error); in aa_change_profile()