Lines Matching refs:hat
983 * Returns: label for hat transition OR ERR_PTR. Does NOT return NULL
988 struct aa_profile *root, *hat = NULL;
1002 hat = aa_find_child(root, name);
1003 if (!hat) {
1006 hat = aa_new_null_profile(profile, true, name,
1008 if (!hat) {
1018 name, hat ? hat->base.hname : NULL,
1019 hat ? &hat->label : NULL, GLOBAL_ROOT_UID, info,
1021 if (!hat || (error && error != -ENOENT))
1023 /* if hat && error - complain mode, already audited and we adjust for
1024 * complain mode allow by returning hat->label
1026 return &hat->label;
1029 /* helper fn for changing into a hat
1031 * Returns: label for hat transition or ERR_PTR. Does not return NULL
1036 struct aa_profile *profile, *root, *hat = NULL;
1050 /*find first matching hat */
1051 for (i = 0; i < count && !hat; i++) {
1063 hat = aa_find_child(root, name);
1065 if (!hat) {
1068 /* complain mode succeed as if hat */
1069 } else if (!PROFILE_IS_HAT(hat)) {
1070 info = "target not hat";
1072 aa_put_profile(hat);
1075 aa_put_profile(hat);
1077 /* found a hat for all profiles in ns */
1085 * hat supplied. This is done due how userspace interacts with
1091 info = "hat not found";
1130 * aa_change_hat - change hat to/from subprofile
1131 * @hats: vector of hat names to try changing into (MAYBE NULL if @count == 0)
1132 * @count: number of hat names in @hats
1133 * @token: magic value to validate the hat change