Lines Matching refs:name
43 * which has a name (AA_NAME typecode followed by name string) followed by
54 AA_NAME, /* same as string except it is items name */
86 if (aad(sa)->name) {
87 audit_log_format(ab, " name=");
88 audit_log_untrustedstring(ab, aad(sa)->name);
97 * @ns_name: name of the ns the profile is to be loaded to (MAY BE NULL)
98 * @name: name of the profile being manipulated (MAYBE NULL)
106 const char *name, const char *info, struct aa_ext *e,
115 aad(&sa)->name = new->base.hname;
117 aad(&sa)->name = name;
167 kfree_sensitive(d->name);
254 * unpack_nameX - check is the next element is of type X with a name of @name
257 * @name: name to match to the serialized element. (MAYBE NULL)
260 * name @name. If @name is specified then there must be a matching
261 * name element in the stream. If @name is NULL any name element will be
264 * Returns true on success (both type code and name tests match) and the read
269 static bool unpack_nameX(struct aa_ext *e, enum aa_code code, const char *name)
272 * May need to reset pos if name or type doesn't match
276 * Check for presence of a tagname, and if present name size
282 /* if a name is specified it must match. otherwise skip tag */
283 if (name && (!size || tag[size-1] != '\0' || strcmp(name, tag)))
285 } else if (name) {
286 /* if a name is specified and there is no name tag fail */
299 static bool unpack_u8(struct aa_ext *e, u8 *data, const char *name)
303 if (unpack_nameX(e, AA_U8, name)) {
317 static bool unpack_u32(struct aa_ext *e, u32 *data, const char *name)
321 if (unpack_nameX(e, AA_U32, name)) {
335 static bool unpack_u64(struct aa_ext *e, u64 *data, const char *name)
339 if (unpack_nameX(e, AA_U64, name)) {
353 static size_t unpack_array(struct aa_ext *e, const char *name)
357 if (unpack_nameX(e, AA_ARRAY, name)) {
371 static size_t unpack_blob(struct aa_ext *e, char **blob, const char *name)
375 if (unpack_nameX(e, AA_BLOB, name)) {
393 static int unpack_str(struct aa_ext *e, const char **string, const char *name)
399 if (unpack_nameX(e, AA_STRING, name)) {
416 static int unpack_strdup(struct aa_ext *e, char **string, const char *name)
420 int res = unpack_str(e, &tmp, name);
504 /* verify that name doesn't start with space */
677 const char *tmpname, *tmpns = NULL, *name = NULL;
692 if (!unpack_str(e, &name, NULL))
694 if (*name == '\0')
697 tmpname = aa_splitn_fqname(name, strlen(name), &tmpns, &ns_len);
700 info = "empty profile name";
708 name = tmpname;
711 profile = aa_alloc_profile(name, NULL, GFP_KERNEL);
940 name = NULL;
941 else if (!name)
942 name = "unknown";
943 audit_iface(profile, NULL, name, info, e, error);
960 const char *name = NULL;
983 if (unpack_str(e, &name, "namespace")) {
984 if (*name == '\0') {
985 audit_iface(NULL, NULL, NULL, "invalid namespace name",
989 if (*ns && strcmp(*ns, name)) {
993 *ns = kstrdup(name, GFP_KERNEL);