Lines Matching refs:hat
1007 * Returns: label for hat transition OR ERR_PTR. Does NOT return NULL
1013 struct aa_profile *root, *hat = NULL;
1027 hat = aa_find_child(root, name);
1028 if (!hat) {
1031 hat = aa_new_learning_profile(profile, true, name,
1033 if (!hat) {
1044 name, hat ? hat->base.hname : NULL,
1045 hat ? &hat->label : NULL, GLOBAL_ROOT_UID, info,
1047 if (!hat || (error && error != -ENOENT))
1049 /* if hat && error - complain mode, already audited and we adjust for
1050 * complain mode allow by returning hat->label
1052 return &hat->label;
1055 /* helper fn for changing into a hat
1057 * Returns: label for hat transition or ERR_PTR. Does not return NULL
1063 struct aa_profile *profile, *root, *hat = NULL;
1077 /*find first matching hat */
1078 for (i = 0; i < count && !hat; i++) {
1090 hat = aa_find_child(root, name);
1092 if (!hat) {
1095 /* complain mode succeed as if hat */
1096 } else if (!PROFILE_IS_HAT(hat)) {
1097 info = "target not hat";
1099 aa_put_profile(hat);
1102 aa_put_profile(hat);
1104 /* found a hat for all profiles in ns */
1112 * hat supplied. This is done due how userspace interacts with
1118 info = "hat not found";
1159 * aa_change_hat - change hat to/from subprofile
1160 * @hats: vector of hat names to try changing into (MAYBE NULL if @count == 0)
1161 * @count: number of hat names in @hats
1162 * @token: magic value to validate the hat change