Lines Matching defs:name
29 * aa_split_fqname - split a fqname into a profile and namespace name
30 * @fqname: a full qualified name in namespace profile format (NOT NULL)
31 * @ns_name: pointer to portion of the string containing the ns name (NOT NULL)
33 * Returns: profile name or NULL if one is not specified
35 * Split a namespace name from a profile name (see policy.c for naming
36 * description). If a portion of the name is missing it returns NULL for
44 char *name = strim(fqname);
47 if (name[0] == ':') {
48 char *split = strchr(&name[1], ':');
49 *ns_name = skip_spaces(&name[1]);
55 name = skip_spaces(split);
57 /* a ns name without a following profile is allowed */
58 name = NULL;
60 if (name && *name == 0)
61 name = NULL;
63 return name;
87 const char *name = skipn_spaces(fqname, n);
92 if (!name)
95 if (name[0] == ':') {
96 char *split = strnchr(&name[1], end - &name[1], ':');
97 *ns_name = skipn_spaces(&name[1], end - &name[1]);
107 name = skipn_spaces(split, end - split);
109 /* a ns name without a following profile is allowed */
110 name = NULL;
114 if (name && *name == 0)
115 name = NULL;
117 return name;
144 return str->name;
480 * @prefix: prefix name if any is required. (MAYBE NULL)
481 * @name: name of the policy, init will make a copy of it (NOT NULL)
489 const char *name, gfp_t gfp)
495 hname = aa_str_alloc(strlen(prefix) + strlen(name) + 3, gfp);
497 sprintf(hname, "%s//%s", prefix, name);
499 hname = aa_str_alloc(strlen(name) + 1, gfp);
501 strcpy(hname, name);
506 /* base.name is a substring of fqname */
507 policy->name = basename(policy->hname);
523 /* don't free name as its a subset of hname */