Lines Matching defs:hat
1063 * Returns: label for hat transition OR ERR_PTR. Does NOT return NULL
1069 struct aa_profile *root, *hat = NULL;
1083 hat = aa_find_child(root, name);
1084 if (!hat) {
1087 hat = aa_new_learning_profile(profile, true, name,
1089 if (!hat) {
1100 name, hat ? hat->base.hname : NULL,
1101 hat ? &hat->label : NULL, GLOBAL_ROOT_UID, info,
1103 if (!hat || (error && error != -ENOENT))
1105 /* if hat && error - complain mode, already audited and we adjust for
1106 * complain mode allow by returning hat->label
1108 return &hat->label;
1111 /* helper fn for changing into a hat
1113 * Returns: label for hat transition or ERR_PTR. Does not return NULL
1119 struct aa_profile *profile, *root, *hat = NULL;
1133 * hat, so that profile replacement doesn't atomically truncate the
1160 /*find first matching hat */
1161 for (i = 0; i < count && !hat; i++) {
1173 hat = aa_find_child(root, name);
1175 if (!hat) {
1178 /* complain mode succeed as if hat */
1179 } else if (!PROFILE_IS_HAT(hat)) {
1180 info = "target not hat";
1182 aa_put_profile(hat);
1185 aa_put_profile(hat);
1187 /* found a hat for all profiles in ns */
1195 * hat supplied. This is done due how userspace interacts with
1201 info = "hat not found";
1241 * aa_change_hat - change hat to/from subprofile
1242 * @hats: vector of hat names to try changing into (MAYBE NULL if @count == 0)
1243 * @count: number of hat names in @hats
1244 * @token: magic value to validate the hat change