Lines Matching defs:name
49 * aa_split_fqname - split a fqname into a profile and namespace name
50 * @fqname: a full qualified name in namespace profile format (NOT NULL)
51 * @ns_name: pointer to portion of the string containing the ns name (NOT NULL)
53 * Returns: profile name or NULL if one is not specified
55 * Split a namespace name from a profile name (see policy.c for naming
56 * description). If a portion of the name is missing it returns NULL for
64 char *name = strim(fqname);
67 if (name[0] == ':') {
68 char *split = strchr(&name[1], ':');
69 *ns_name = skip_spaces(&name[1]);
75 name = skip_spaces(split);
77 /* a ns name without a following profile is allowed */
78 name = NULL;
80 if (name && *name == 0)
81 name = NULL;
83 return name;
108 const char *name = skipn_spaces(fqname, n);
113 if (!name)
116 if (name[0] == ':') {
117 char *split = strnchr(&name[1], end - &name[1], ':');
118 *ns_name = skipn_spaces(&name[1], end - &name[1]);
128 name = skipn_spaces(split, end - split);
130 /* a ns name without a following profile is allowed */
131 name = NULL;
135 if (name && *name == 0)
136 name = NULL;
138 return name;
160 str = kmalloc(struct_size(str, name, size), gfp);
165 return str->name;
439 * @prefix: prefix name if any is required. (MAYBE NULL)
440 * @name: name of the policy, init will make a copy of it (NOT NULL)
448 const char *name, gfp_t gfp)
454 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp);
456 sprintf(hname, "%s//%s", prefix, name);
458 hname = aa_str_alloc(strlen(name) + 1, gfp);
460 strcpy(hname, name);
465 /* base.name is a substring of fqname */
466 policy->name = basename(policy->hname);
482 /* don't free name as its a subset of hname */