Lines Matching full:ent
911 struct aa_load_ent *ent; in __list_lookup_parent() local
918 list_for_each_entry(ent, lh, list) { in __list_lookup_parent()
919 if (ent->new == profile) in __list_lookup_parent()
921 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
922 0 && ent->new->base.hname[len] == 0) in __list_lookup_parent()
923 return ent->new; in __list_lookup_parent()
1062 struct aa_load_ent *ent, *tmp; in aa_replace_profiles() local
1078 * fail. Sort ent list and take ns locks in hierarchy order in aa_replace_profiles()
1081 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1083 if (ent->ns_name && in aa_replace_profiles()
1084 strcmp(ent->ns_name, ns_name) != 0) { in aa_replace_profiles()
1089 } else if (ent->ns_name) { in aa_replace_profiles()
1095 ns_name = ent->ns_name; in aa_replace_profiles()
1107 ent = NULL; in aa_replace_profiles()
1131 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1136 ent->new->rawdata = aa_get_loaddata(udata); in aa_replace_profiles()
1137 error = __lookup_replace(ns, ent->new->base.hname, in aa_replace_profiles()
1139 &ent->old, &info); in aa_replace_profiles()
1143 if (ent->new->rename) { in aa_replace_profiles()
1144 error = __lookup_replace(ns, ent->new->rename, in aa_replace_profiles()
1146 &ent->rename, &info); in aa_replace_profiles()
1152 ent->new->ns = aa_get_ns(ns); in aa_replace_profiles()
1154 if (ent->old || ent->rename) in aa_replace_profiles()
1159 policy = __lookup_parent(ns, ent->new->base.hname); in aa_replace_profiles()
1162 p = __list_lookup_parent(&lh, ent->new); in aa_replace_profiles()
1177 ent->new->base.hname, in aa_replace_profiles()
1189 rcu_assign_pointer(ent->new->parent, aa_get_profile(p)); in aa_replace_profiles()
1197 ent = NULL; in aa_replace_profiles()
1201 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1202 if (!ent->old) { in aa_replace_profiles()
1204 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1206 p = aa_deref_parent(ent->new); in aa_replace_profiles()
1209 parent = ns_subprofs_dir(ent->new->ns); in aa_replace_profiles()
1210 error = __aafs_profile_mkdir(ent->new, parent); in aa_replace_profiles()
1223 list_for_each_entry_safe(ent, tmp, &lh, list) { in aa_replace_profiles()
1224 list_del_init(&ent->list); in aa_replace_profiles()
1225 op = (!ent->old && !ent->rename) ? OP_PROF_LOAD : OP_PROF_REPL; in aa_replace_profiles()
1227 if (ent->old && ent->old->rawdata == ent->new->rawdata && in aa_replace_profiles()
1228 ent->new->rawdata) { in aa_replace_profiles()
1230 audit_policy(label, op, ns_name, ent->new->base.hname, in aa_replace_profiles()
1234 aa_put_proxy(ent->new->label.proxy); in aa_replace_profiles()
1235 ent->new->label.proxy = NULL; in aa_replace_profiles()
1243 audit_policy(label, op, ns_name, ent->new->base.hname, NULL, in aa_replace_profiles()
1246 if (ent->old) { in aa_replace_profiles()
1247 share_name(ent->old, ent->new); in aa_replace_profiles()
1248 __replace_profile(ent->old, ent->new); in aa_replace_profiles()
1252 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1255 parent = update_to_newest_parent(ent->new); in aa_replace_profiles()
1259 __add_profile(lh, ent->new); in aa_replace_profiles()
1262 aa_load_ent_free(ent); in aa_replace_profiles()
1280 op = (ent && !ent->old) ? OP_PROF_LOAD : OP_PROF_REPL; in aa_replace_profiles()
1282 audit_policy(label, op, ns_name, ent ? ent->new->base.hname : NULL, in aa_replace_profiles()
1287 if (tmp == ent) { in aa_replace_profiles()
1296 list_for_each_entry_safe(ent, tmp, &lh, list) { in aa_replace_profiles()
1297 list_del_init(&ent->list); in aa_replace_profiles()
1298 aa_load_ent_free(ent); in aa_replace_profiles()