Lines Matching refs:ent
887 struct aa_load_ent *ent; in __list_lookup_parent() local
894 list_for_each_entry(ent, lh, list) { in __list_lookup_parent()
895 if (ent->new == profile) in __list_lookup_parent()
897 if (strncmp(ent->new->base.hname, profile->base.hname, len) == in __list_lookup_parent()
898 0 && ent->new->base.hname[len] == 0) in __list_lookup_parent()
899 return ent->new; in __list_lookup_parent()
1038 struct aa_load_ent *ent, *tmp; in aa_replace_profiles() local
1057 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1059 if (ent->ns_name && in aa_replace_profiles()
1060 strcmp(ent->ns_name, ns_name) != 0) { in aa_replace_profiles()
1065 } else if (ent->ns_name) { in aa_replace_profiles()
1071 ns_name = ent->ns_name; in aa_replace_profiles()
1083 ent = NULL; in aa_replace_profiles()
1107 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1112 ent->new->rawdata = aa_get_loaddata(udata); in aa_replace_profiles()
1113 error = __lookup_replace(ns, ent->new->base.hname, in aa_replace_profiles()
1115 &ent->old, &info); in aa_replace_profiles()
1119 if (ent->new->rename) { in aa_replace_profiles()
1120 error = __lookup_replace(ns, ent->new->rename, in aa_replace_profiles()
1122 &ent->rename, &info); in aa_replace_profiles()
1128 ent->new->ns = aa_get_ns(ns); in aa_replace_profiles()
1130 if (ent->old || ent->rename) in aa_replace_profiles()
1135 policy = __lookup_parent(ns, ent->new->base.hname); in aa_replace_profiles()
1138 p = __list_lookup_parent(&lh, ent->new); in aa_replace_profiles()
1153 ent->new->base.hname, in aa_replace_profiles()
1165 rcu_assign_pointer(ent->new->parent, aa_get_profile(p)); in aa_replace_profiles()
1173 ent = NULL; in aa_replace_profiles()
1177 list_for_each_entry(ent, &lh, list) { in aa_replace_profiles()
1178 if (!ent->old) { in aa_replace_profiles()
1180 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1182 p = aa_deref_parent(ent->new); in aa_replace_profiles()
1185 parent = ns_subprofs_dir(ent->new->ns); in aa_replace_profiles()
1186 error = __aafs_profile_mkdir(ent->new, parent); in aa_replace_profiles()
1199 list_for_each_entry_safe(ent, tmp, &lh, list) { in aa_replace_profiles()
1200 list_del_init(&ent->list); in aa_replace_profiles()
1201 op = (!ent->old && !ent->rename) ? OP_PROF_LOAD : OP_PROF_REPL; in aa_replace_profiles()
1203 if (ent->old && ent->old->rawdata == ent->new->rawdata && in aa_replace_profiles()
1204 ent->new->rawdata) { in aa_replace_profiles()
1206 audit_policy(label, op, ns_name, ent->new->base.hname, in aa_replace_profiles()
1210 aa_put_proxy(ent->new->label.proxy); in aa_replace_profiles()
1211 ent->new->label.proxy = NULL; in aa_replace_profiles()
1219 audit_policy(label, op, ns_name, ent->new->base.hname, NULL, in aa_replace_profiles()
1222 if (ent->old) { in aa_replace_profiles()
1223 share_name(ent->old, ent->new); in aa_replace_profiles()
1224 __replace_profile(ent->old, ent->new); in aa_replace_profiles()
1228 if (rcu_access_pointer(ent->new->parent)) { in aa_replace_profiles()
1231 parent = update_to_newest_parent(ent->new); in aa_replace_profiles()
1235 __add_profile(lh, ent->new); in aa_replace_profiles()
1238 aa_load_ent_free(ent); in aa_replace_profiles()
1256 op = (ent && !ent->old) ? OP_PROF_LOAD : OP_PROF_REPL; in aa_replace_profiles()
1258 audit_policy(label, op, ns_name, ent ? ent->new->base.hname : NULL, in aa_replace_profiles()
1263 if (tmp == ent) { in aa_replace_profiles()
1272 list_for_each_entry_safe(ent, tmp, &lh, list) { in aa_replace_profiles()
1273 list_del_init(&ent->list); in aa_replace_profiles()
1274 aa_load_ent_free(ent); in aa_replace_profiles()