• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/security/apparmor/

Lines Matching refs:hname

30  * hname_tail - find the last component of an hname
31 * @name: hname to find the base profile name component of (NOT NULL)
33 * Returns: the tail (base profile name) name component of an hname
35 static const char *hname_tail(const char *hname)
38 hname = strim((char *)hname);
39 for (split = strstr(hname, "//"); split; split = strstr(hname, "//"))
40 hname = split + 2;
42 return hname;
60 policy->hname = kmalloc(strlen(prefix) + strlen(name) + 3,
62 if (policy->hname)
63 sprintf(policy->hname, "%s//%s", prefix, name);
65 policy->hname = kstrdup(name, GFP_KERNEL);
66 if (!policy->hname)
69 policy->name = (char *)hname_tail(policy->hname);
96 /* don't free name as its a subset of hname */
97 kzfree(policy->hname);
185 * thus the curr ns.hname is a prefix of its name.
187 * Add + 2 to skip over // separating curr hname prefix
188 * from the visible tail of the views hname
190 return view->base.hname + strlen(curr->base.hname) + 2;
338 new_ns = alloc_namespace(root->base.hname, name);
567 * @hname: name of the profile (NOT NULL)
571 struct aa_profile *aa_alloc_profile(const char *hname)
580 if (!policy_init(&profile->base, NULL, hname)) {
610 name = kmalloc(strlen(parent->base.hname) + 2 + 7 + 8, GFP_KERNEL);
613 sprintf(name, "%s//null-%x", parent->base.hname, sid);
749 * __lookup_parent - lookup the parent of a profile of name @hname
751 * @hname: hierarchical profile name to find parent of (NOT NULL)
754 * that matches hname does not need to exist, in general this
762 const char *hname)
770 for (split = strstr(hname, "//"); split;) {
771 profile = __strn_find_child(&policy->profiles, hname,
772 split - hname);
776 hname = split + 2;
777 split = strstr(hname, "//");
785 * __lookup_profile - lookup the profile matching @hname
787 * @hname: hierarchical profile name (NOT NULL)
796 const char *hname)
801 for (split = strstr(hname, "//"); split;) {
802 profile = __strn_find_child(&base->profiles, hname,
803 split - hname);
808 hname = split + 2;
809 split = strstr(hname, "//");
812 profile = __find_child(&base->profiles, hname);
820 * @hname: name to do lookup on. Does not contain namespace prefix (NOT NULL)
824 struct aa_profile *aa_lookup_profile(struct aa_namespace *ns, const char *hname)
829 profile = aa_get_profile(__lookup_profile(&ns->base, hname));
964 name = new_profile->base.hname;
968 policy = __lookup_parent(ns, new_profile->base.hname);
1095 name = profile->base.hname;