• Home
  • Raw
  • Download

Lines Matching full:new

51 	struct cil_list *new;  in cil_copy_list()  local
54 cil_list_init(&new, data->flavor); in cil_copy_list()
59 cil_list_append(new, CIL_STRING, orig_item->data); in cil_copy_list()
64 cil_list_append(new, CIL_LIST, new_sub); in cil_copy_list()
73 cil_list_append(new, CIL_PARAM, pn); in cil_copy_list()
78 cil_list_append(new, orig_item->flavor, orig_item->data); in cil_copy_list()
83 *copy = new; in cil_copy_list()
88 char *new = NULL; in cil_copy_node() local
91 new = data; in cil_copy_node()
93 *copy = new; in cil_copy_node()
106 struct cil_block *new; in cil_copy_block() local
107 cil_block_init(&new); in cil_copy_block()
108 *copy = new; in cil_copy_block()
119 struct cil_blockabstract *new = NULL; in cil_copy_blockabstract() local
121 cil_blockabstract_init(&new); in cil_copy_blockabstract()
123 new->block_str = orig->block_str; in cil_copy_blockabstract()
125 *copy = new; in cil_copy_blockabstract()
133 struct cil_blockinherit *new = NULL; in cil_copy_blockinherit() local
135 cil_blockinherit_init(&new); in cil_copy_blockinherit()
137 new->block_str = orig->block_str; in cil_copy_blockinherit()
138 new->block = orig->block; in cil_copy_blockinherit()
140 *copy = new; in cil_copy_blockinherit()
153 struct cil_policycap *new; in cil_copy_policycap() local
154 cil_policycap_init(&new); in cil_copy_policycap()
155 *copy = new; in cil_copy_policycap()
171 struct cil_perm *new; in cil_copy_perm() local
172 cil_perm_init(&new); in cil_copy_perm()
173 *copy = new; in cil_copy_perm()
181 void cil_copy_classperms(struct cil_classperms *orig, struct cil_classperms **new) in cil_copy_classperms() argument
183 cil_classperms_init(new); in cil_copy_classperms()
184 (*new)->class_str = orig->class_str; in cil_copy_classperms()
185 cil_copy_list(orig->perm_strs, &((*new)->perm_strs)); in cil_copy_classperms()
188 void cil_copy_classperms_set(struct cil_classperms_set *orig, struct cil_classperms_set **new) in cil_copy_classperms_set() argument
190 cil_classperms_set_init(new); in cil_copy_classperms_set()
191 (*new)->set_str = orig->set_str; in cil_copy_classperms_set()
194 void cil_copy_classperms_list(struct cil_list *orig, struct cil_list **new) in cil_copy_classperms_list() argument
202 cil_list_init(new, CIL_LIST_ITEM); in cil_copy_classperms_list()
207 cil_list_append(*new, CIL_CLASSPERMS, cp); in cil_copy_classperms_list()
211 cil_list_append(*new, CIL_CLASSPERMS_SET, cp_set); in cil_copy_classperms_list()
219 struct cil_classmapping *new = NULL; in cil_copy_classmapping() local
221 cil_classmapping_init(&new); in cil_copy_classmapping()
223 new->map_class_str = orig->map_class_str; in cil_copy_classmapping()
224 new->map_perm_str = orig->map_perm_str; in cil_copy_classmapping()
226 cil_copy_classperms_list(orig->classperms, &new->classperms); in cil_copy_classmapping()
228 *copy = new; in cil_copy_classmapping()
236 struct cil_class *new = NULL; in cil_copy_class() local
246 cil_class_init(&new); in cil_copy_class()
248 new->common = NULL; in cil_copy_class()
250 *copy = new; in cil_copy_class()
258 struct cil_classorder *new = NULL; in cil_copy_classorder() local
260 cil_classorder_init(&new); in cil_copy_classorder()
262 cil_copy_list(orig->class_list_str, &new->class_list_str); in cil_copy_classorder()
265 *copy = new; in cil_copy_classorder()
273 struct cil_classpermission *new = NULL; in cil_copy_classpermission() local
285 cil_classpermission_init(&new); in cil_copy_classpermission()
287 cil_copy_classperms_list(orig->classperms, &new->classperms); in cil_copy_classpermission()
289 *copy = new; in cil_copy_classpermission()
297 struct cil_classpermissionset *new = NULL; in cil_copy_classpermissionset() local
299 cil_classpermissionset_init(&new); in cil_copy_classpermissionset()
301 new->set_str = orig->set_str; in cil_copy_classpermissionset()
303 cil_copy_classperms_list(orig->classperms, &new->classperms); in cil_copy_classpermissionset()
305 *copy = new; in cil_copy_classpermissionset()
313 struct cil_classcommon *new = NULL; in cil_copy_classcommon() local
315 cil_classcommon_init(&new); in cil_copy_classcommon()
317 new->class_str = orig->class_str; in cil_copy_classcommon()
318 new->common_str = orig->common_str; in cil_copy_classcommon()
320 *copy = new; in cil_copy_classcommon()
333 struct cil_sid *new; in cil_copy_sid() local
334 cil_sid_init(&new); in cil_copy_sid()
335 *copy = new; in cil_copy_sid()
346 struct cil_sidcontext *new = NULL; in cil_copy_sidcontext() local
348 cil_sidcontext_init(&new); in cil_copy_sidcontext()
351 new->context_str = orig->context_str; in cil_copy_sidcontext()
353 cil_context_init(&new->context); in cil_copy_sidcontext()
354 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_sidcontext()
357 *copy = new; in cil_copy_sidcontext()
365 struct cil_sidorder *new = NULL; in cil_copy_sidorder() local
367 cil_sidorder_init(&new); in cil_copy_sidorder()
369 cil_copy_list(orig->sid_list_str, &new->sid_list_str); in cil_copy_sidorder()
372 *copy = new; in cil_copy_sidorder()
385 struct cil_user *new; in cil_copy_user() local
386 cil_user_init(&new); in cil_copy_user()
387 *copy = new; in cil_copy_user()
398 struct cil_userattribute *new = NULL; in cil_copy_userattribute() local
404 cil_userattribute_init(&new); in cil_copy_userattribute()
405 *copy = new; in cil_copy_userattribute()
416 struct cil_userattributeset *new = NULL; in cil_copy_userattributeset() local
418 cil_userattributeset_init(&new); in cil_copy_userattributeset()
420 new->attr_str = orig->attr_str; in cil_copy_userattributeset()
422 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_userattributeset()
423 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_userattributeset()
425 *copy = new; in cil_copy_userattributeset()
433 struct cil_userrole *new = NULL; in cil_copy_userrole() local
435 cil_userrole_init(&new); in cil_copy_userrole()
437 new->user_str = orig->user_str; in cil_copy_userrole()
438 new->role_str = orig->role_str; in cil_copy_userrole()
440 *copy = new; in cil_copy_userrole()
448 struct cil_userlevel *new = NULL; in cil_copy_userlevel() local
450 cil_userlevel_init(&new); in cil_copy_userlevel()
452 new->user_str = orig->user_str; in cil_copy_userlevel()
455 new->level_str = orig->level_str; in cil_copy_userlevel()
457 cil_copy_fill_level(db, orig->level, &new->level); in cil_copy_userlevel()
460 *copy = new; in cil_copy_userlevel()
468 struct cil_userrange *new = NULL; in cil_copy_userrange() local
470 cil_userrange_init(&new); in cil_copy_userrange()
472 new->user_str = orig->user_str; in cil_copy_userrange()
475 new->range_str = orig->range_str; in cil_copy_userrange()
477 cil_levelrange_init(&new->range); in cil_copy_userrange()
478 cil_copy_fill_levelrange(db, orig->range, new->range); in cil_copy_userrange()
481 *copy = new; in cil_copy_userrange()
489 struct cil_userprefix *new = NULL; in cil_copy_userprefix() local
491 cil_userprefix_init(&new); in cil_copy_userprefix()
493 new->user_str = orig->user_str; in cil_copy_userprefix()
494 new->prefix_str = orig->prefix_str; in cil_copy_userprefix()
496 *copy = new; in cil_copy_userprefix()
509 struct cil_role *new; in cil_copy_role() local
510 cil_role_init(&new); in cil_copy_role()
511 *copy = new; in cil_copy_role()
522 struct cil_roletype *new = NULL; in cil_copy_roletype() local
524 cil_roletype_init(&new); in cil_copy_roletype()
526 new->role_str = orig->role_str; in cil_copy_roletype()
527 new->type_str = orig->type_str; in cil_copy_roletype()
529 *copy = new; in cil_copy_roletype()
542 struct cil_roleattribute *new; in cil_copy_roleattribute() local
543 cil_roleattribute_init(&new); in cil_copy_roleattribute()
544 *copy = new; in cil_copy_roleattribute()
555 struct cil_roleattributeset *new = NULL; in cil_copy_roleattributeset() local
557 cil_roleattributeset_init(&new); in cil_copy_roleattributeset()
559 new->attr_str = orig->attr_str; in cil_copy_roleattributeset()
561 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_roleattributeset()
562 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_roleattributeset()
564 *copy = new; in cil_copy_roleattributeset()
572 struct cil_roleallow *new = NULL; in cil_copy_roleallow() local
574 cil_roleallow_init(&new); in cil_copy_roleallow()
576 new->src_str = orig->src_str; in cil_copy_roleallow()
577 new->tgt_str = orig->tgt_str; in cil_copy_roleallow()
579 *copy = new; in cil_copy_roleallow()
592 struct cil_type *new; in cil_copy_type() local
593 cil_type_init(&new); in cil_copy_type()
594 *copy = new; in cil_copy_type()
605 struct cil_typepermissive *new = NULL; in cil_copy_typepermissive() local
607 cil_typepermissive_init(&new); in cil_copy_typepermissive()
609 new->type_str = orig->type_str; in cil_copy_typepermissive()
611 *copy = new; in cil_copy_typepermissive()
624 struct cil_typeattribute *new; in cil_copy_typeattribute() local
625 cil_typeattribute_init(&new); in cil_copy_typeattribute()
626 *copy = new; in cil_copy_typeattribute()
637 struct cil_typeattributeset *new = NULL; in cil_copy_typeattributeset() local
639 cil_typeattributeset_init(&new); in cil_copy_typeattributeset()
641 new->attr_str = orig->attr_str; in cil_copy_typeattributeset()
643 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_typeattributeset()
644 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_typeattributeset()
646 *copy = new; in cil_copy_typeattributeset()
654 struct cil_expandtypeattribute *new = NULL; in cil_copy_expandtypeattribute() local
657 cil_expandtypeattribute_init(&new); in cil_copy_expandtypeattribute()
660 cil_copy_list(orig->attr_strs, &new->attr_strs); in cil_copy_expandtypeattribute()
664 cil_copy_list(orig->attr_datums, &new->attr_datums); in cil_copy_expandtypeattribute()
667 new->expand = orig->expand; in cil_copy_expandtypeattribute()
669 *copy = new; in cil_copy_expandtypeattribute()
677 struct cil_alias *new = NULL; in cil_copy_alias() local
687 cil_alias_init(&new); in cil_copy_alias()
689 *copy = new; in cil_copy_alias()
697 struct cil_aliasactual *new = NULL; in cil_copy_aliasactual() local
699 cil_aliasactual_init(&new); in cil_copy_aliasactual()
701 new->alias_str = orig->alias_str; in cil_copy_aliasactual()
702 new->actual_str = orig->actual_str; in cil_copy_aliasactual()
704 *copy = new; in cil_copy_aliasactual()
712 struct cil_roletransition *new = NULL; in cil_copy_roletransition() local
714 cil_roletransition_init(&new); in cil_copy_roletransition()
716 new->src_str = orig->src_str; in cil_copy_roletransition()
717 new->tgt_str = orig->tgt_str; in cil_copy_roletransition()
718 new->obj_str = orig->obj_str; in cil_copy_roletransition()
719 new->result_str = orig->result_str; in cil_copy_roletransition()
721 *copy = new; in cil_copy_roletransition()
729 struct cil_nametypetransition *new = NULL; in cil_copy_nametypetransition() local
731 cil_nametypetransition_init(&new); in cil_copy_nametypetransition()
733 new->src_str = orig->src_str; in cil_copy_nametypetransition()
734 new->tgt_str = orig->tgt_str; in cil_copy_nametypetransition()
735 new->obj_str = orig->obj_str; in cil_copy_nametypetransition()
736 new->name_str = orig->name_str; in cil_copy_nametypetransition()
737 new->result_str = orig->result_str; in cil_copy_nametypetransition()
740 *copy = new; in cil_copy_nametypetransition()
748 struct cil_rangetransition *new = NULL; in cil_copy_rangetransition() local
750 cil_rangetransition_init(&new); in cil_copy_rangetransition()
752 new->src_str = orig->src_str; in cil_copy_rangetransition()
753 new->exec_str = orig->exec_str; in cil_copy_rangetransition()
754 new->obj_str = orig->obj_str; in cil_copy_rangetransition()
757 new->range_str = orig->range_str; in cil_copy_rangetransition()
759 cil_levelrange_init(&new->range); in cil_copy_rangetransition()
760 cil_copy_fill_levelrange(db, orig->range, new->range); in cil_copy_rangetransition()
763 *copy = new; in cil_copy_rangetransition()
771 struct cil_bool *new = NULL; in cil_copy_bool() local
781 cil_bool_init(&new); in cil_copy_bool()
782 new->value = orig->value; in cil_copy_bool()
783 *copy = new; in cil_copy_bool()
791 struct cil_tunable *new = NULL; in cil_copy_tunable() local
801 cil_tunable_init(&new); in cil_copy_tunable()
802 new->value = orig->value; in cil_copy_tunable()
803 *copy = new; in cil_copy_tunable()
808 …copy_fill_permissionx(struct cil_db *db, struct cil_permissionx *orig, struct cil_permissionx *new) in cil_copy_fill_permissionx() argument
810 new->kind = orig->kind; in cil_copy_fill_permissionx()
811 new->obj_str = orig->obj_str; in cil_copy_fill_permissionx()
812 cil_copy_expr(db, orig->expr_str, &new->expr_str); in cil_copy_fill_permissionx()
818 struct cil_avrule *new = NULL; in cil_copy_avrule() local
820 cil_avrule_init(&new); in cil_copy_avrule()
822 new->is_extended = orig->is_extended; in cil_copy_avrule()
823 new->rule_kind = orig->rule_kind; in cil_copy_avrule()
824 new->src_str = orig->src_str; in cil_copy_avrule()
825 new->tgt_str = orig->tgt_str; in cil_copy_avrule()
827 if (!new->is_extended) { in cil_copy_avrule()
828 cil_copy_classperms_list(orig->perms.classperms, &new->perms.classperms); in cil_copy_avrule()
830 if (new->perms.x.permx_str != NULL) { in cil_copy_avrule()
831 new->perms.x.permx_str = orig->perms.x.permx_str; in cil_copy_avrule()
833 cil_permissionx_init(&new->perms.x.permx); in cil_copy_avrule()
834 cil_copy_fill_permissionx(db, orig->perms.x.permx, new->perms.x.permx); in cil_copy_avrule()
838 *copy = new; in cil_copy_avrule()
846 struct cil_permissionx *new = NULL; in cil_copy_permissionx() local
857 cil_permissionx_init(&new); in cil_copy_permissionx()
858 cil_copy_fill_permissionx(db, orig, new); in cil_copy_permissionx()
860 *copy = new; in cil_copy_permissionx()
868 struct cil_type_rule *new = NULL; in cil_copy_type_rule() local
870 cil_type_rule_init(&new); in cil_copy_type_rule()
872 new->rule_kind = orig->rule_kind; in cil_copy_type_rule()
873 new->src_str = orig->src_str; in cil_copy_type_rule()
874 new->tgt_str = orig->tgt_str; in cil_copy_type_rule()
875 new->obj_str = orig->obj_str; in cil_copy_type_rule()
876 new->result_str = orig->result_str; in cil_copy_type_rule()
878 *copy = new; in cil_copy_type_rule()
891 struct cil_sens *new; in cil_copy_sens() local
892 cil_sens_init(&new); in cil_copy_sens()
893 *copy = new; in cil_copy_sens()
909 struct cil_cat *new; in cil_copy_cat() local
910 cil_cat_init(&new); in cil_copy_cat()
911 *copy = new; in cil_copy_cat()
919 void cil_copy_cats(struct cil_db *db, struct cil_cats *orig, struct cil_cats **new) in cil_copy_cats() argument
921 cil_cats_init(new); in cil_copy_cats()
922 cil_copy_expr(db, orig->str_expr, &(*new)->str_expr); in cil_copy_cats()
923 cil_copy_expr(db, orig->datum_expr, &(*new)->datum_expr); in cil_copy_cats()
929 struct cil_catset *new = NULL; in cil_copy_catset() local
939 cil_catset_init(&new); in cil_copy_catset()
941 cil_copy_cats(db, orig->cats, &new->cats); in cil_copy_catset()
943 *copy = new; in cil_copy_catset()
951 struct cil_senscat *new = NULL; in cil_copy_senscat() local
953 cil_senscat_init(&new); in cil_copy_senscat()
955 new->sens_str = orig->sens_str; in cil_copy_senscat()
957 cil_copy_cats(db, orig->cats, &new->cats); in cil_copy_senscat()
959 *copy = new; in cil_copy_senscat()
967 struct cil_catorder *new = NULL; in cil_copy_catorder() local
969 cil_catorder_init(&new); in cil_copy_catorder()
971 cil_copy_list(orig->cat_list_str, &new->cat_list_str); in cil_copy_catorder()
974 *copy = new; in cil_copy_catorder()
982 struct cil_sensorder *new = NULL; in cil_copy_sensitivityorder() local
984 cil_sensorder_init(&new); in cil_copy_sensitivityorder()
986 cil_copy_list(orig->sens_list_str, &new->sens_list_str); in cil_copy_sensitivityorder()
989 *copy = new; in cil_copy_sensitivityorder()
994 void cil_copy_fill_level(struct cil_db *db, struct cil_level *orig, struct cil_level **new) in cil_copy_fill_level() argument
996 cil_level_init(new); in cil_copy_fill_level()
998 (*new)->sens_str = orig->sens_str; in cil_copy_fill_level()
1001 cil_copy_cats(db, orig->cats, &(*new)->cats); in cil_copy_fill_level()
1008 struct cil_level *new = NULL; in cil_copy_level() local
1020 cil_copy_fill_level(db, orig, &new); in cil_copy_level()
1022 *copy = new; in cil_copy_level()
1027 …il_copy_fill_levelrange(struct cil_db *db, struct cil_levelrange *data, struct cil_levelrange *new) in cil_copy_fill_levelrange() argument
1030 new->low_str = data->low_str; in cil_copy_fill_levelrange()
1032 cil_copy_fill_level(db, data->low, &new->low); in cil_copy_fill_levelrange()
1036 new->high_str = data->high_str; in cil_copy_fill_levelrange()
1038 cil_copy_fill_level(db, data->high, &new->high); in cil_copy_fill_levelrange()
1045 struct cil_levelrange *new = NULL; in cil_copy_levelrange() local
1057 cil_levelrange_init(&new); in cil_copy_levelrange()
1058 cil_copy_fill_levelrange(db, orig, new); in cil_copy_levelrange()
1060 *copy = new; in cil_copy_levelrange()
1065 void cil_copy_fill_context(struct cil_db *db, struct cil_context *data, struct cil_context *new) in cil_copy_fill_context() argument
1067 new->user_str = data->user_str; in cil_copy_fill_context()
1068 new->role_str = data->role_str; in cil_copy_fill_context()
1069 new->type_str = data->type_str; in cil_copy_fill_context()
1072 new->range_str = data->range_str; in cil_copy_fill_context()
1074 cil_levelrange_init(&new->range); in cil_copy_fill_context()
1075 cil_copy_fill_levelrange(db, data->range, new->range); in cil_copy_fill_context()
1082 struct cil_context *new = NULL; in cil_copy_context() local
1094 cil_context_init(&new); in cil_copy_context()
1095 cil_copy_fill_context(db, orig, new); in cil_copy_context()
1097 *copy = new; in cil_copy_context()
1105 struct cil_netifcon *new = NULL; in cil_copy_netifcon() local
1107 cil_netifcon_init(&new); in cil_copy_netifcon()
1109 new->interface_str = orig->interface_str; in cil_copy_netifcon()
1112 new->if_context_str = orig->if_context_str; in cil_copy_netifcon()
1114 cil_context_init(&new->if_context); in cil_copy_netifcon()
1115 cil_copy_fill_context(db, orig->if_context, new->if_context); in cil_copy_netifcon()
1119 new->packet_context_str = orig->packet_context_str; in cil_copy_netifcon()
1121 cil_context_init(&new->packet_context); in cil_copy_netifcon()
1122 cil_copy_fill_context(db, orig->packet_context, new->packet_context); in cil_copy_netifcon()
1125 *copy = new; in cil_copy_netifcon()
1133 struct cil_genfscon *new = NULL; in cil_copy_genfscon() local
1135 cil_genfscon_init(&new); in cil_copy_genfscon()
1137 new->fs_str = orig->fs_str; in cil_copy_genfscon()
1138 new->path_str = orig->path_str; in cil_copy_genfscon()
1141 new->context_str = orig->context_str; in cil_copy_genfscon()
1143 cil_context_init(&new->context); in cil_copy_genfscon()
1144 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_genfscon()
1147 *copy = new; in cil_copy_genfscon()
1155 struct cil_filecon *new = NULL; in cil_copy_filecon() local
1157 cil_filecon_init(&new); in cil_copy_filecon()
1159 new->path_str = orig->path_str; in cil_copy_filecon()
1160 new->type = orig->type; in cil_copy_filecon()
1163 new->context_str = orig->context_str; in cil_copy_filecon()
1165 cil_context_init(&new->context); in cil_copy_filecon()
1166 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_filecon()
1169 *copy = new; in cil_copy_filecon()
1177 struct cil_nodecon *new = NULL; in cil_copy_nodecon() local
1179 cil_nodecon_init(&new); in cil_copy_nodecon()
1182 new->addr_str = orig->addr_str; in cil_copy_nodecon()
1184 cil_ipaddr_init(&new->addr); in cil_copy_nodecon()
1185 cil_copy_fill_ipaddr(orig->addr, new->addr); in cil_copy_nodecon()
1189 new->mask_str = orig->mask_str; in cil_copy_nodecon()
1191 cil_ipaddr_init(&new->mask); in cil_copy_nodecon()
1192 cil_copy_fill_ipaddr(orig->mask, new->mask); in cil_copy_nodecon()
1196 new->context_str = orig->context_str; in cil_copy_nodecon()
1198 cil_context_init(&new->context); in cil_copy_nodecon()
1199 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_nodecon()
1202 *copy = new; in cil_copy_nodecon()
1210 struct cil_portcon *new = NULL; in cil_copy_portcon() local
1212 cil_portcon_init(&new); in cil_copy_portcon()
1214 new->proto = orig->proto; in cil_copy_portcon()
1215 new->port_low = orig->port_low; in cil_copy_portcon()
1216 new->port_high = orig->port_high; in cil_copy_portcon()
1219 new->context_str = orig->context_str; in cil_copy_portcon()
1221 cil_context_init(&new->context); in cil_copy_portcon()
1222 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_portcon()
1225 *copy = new; in cil_copy_portcon()
1233 struct cil_pirqcon *new = NULL; in cil_copy_pirqcon() local
1235 cil_pirqcon_init(&new); in cil_copy_pirqcon()
1237 new->pirq = orig->pirq; in cil_copy_pirqcon()
1240 new->context_str = orig->context_str; in cil_copy_pirqcon()
1242 cil_context_init(&new->context); in cil_copy_pirqcon()
1243 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_pirqcon()
1246 *copy = new; in cil_copy_pirqcon()
1254 struct cil_iomemcon *new = NULL; in cil_copy_iomemcon() local
1256 cil_iomemcon_init(&new); in cil_copy_iomemcon()
1258 new->iomem_low = orig->iomem_low; in cil_copy_iomemcon()
1259 new->iomem_high = orig->iomem_high; in cil_copy_iomemcon()
1262 new->context_str = orig->context_str; in cil_copy_iomemcon()
1264 cil_context_init(&new->context); in cil_copy_iomemcon()
1265 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_iomemcon()
1268 *copy = new; in cil_copy_iomemcon()
1276 struct cil_ioportcon *new = NULL; in cil_copy_ioportcon() local
1278 cil_ioportcon_init(&new); in cil_copy_ioportcon()
1280 new->ioport_low = orig->ioport_low; in cil_copy_ioportcon()
1281 new->ioport_high = orig->ioport_high; in cil_copy_ioportcon()
1284 new->context_str = orig->context_str; in cil_copy_ioportcon()
1286 cil_context_init(&new->context); in cil_copy_ioportcon()
1287 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_ioportcon()
1290 *copy = new; in cil_copy_ioportcon()
1298 struct cil_pcidevicecon *new = NULL; in cil_copy_pcidevicecon() local
1300 cil_pcidevicecon_init(&new); in cil_copy_pcidevicecon()
1302 new->dev = orig->dev; in cil_copy_pcidevicecon()
1305 new->context_str = orig->context_str; in cil_copy_pcidevicecon()
1307 cil_context_init(&new->context); in cil_copy_pcidevicecon()
1308 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_pcidevicecon()
1311 *copy = new; in cil_copy_pcidevicecon()
1319 struct cil_devicetreecon *new = NULL; in cil_copy_devicetreecon() local
1321 cil_devicetreecon_init(&new); in cil_copy_devicetreecon()
1323 new->path = orig->path; in cil_copy_devicetreecon()
1326 new->context_str = orig->context_str; in cil_copy_devicetreecon()
1328 cil_context_init(&new->context); in cil_copy_devicetreecon()
1329 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_devicetreecon()
1332 *copy = new; in cil_copy_devicetreecon()
1340 struct cil_fsuse *new = NULL; in cil_copy_fsuse() local
1342 cil_fsuse_init(&new); in cil_copy_fsuse()
1344 new->type = orig->type; in cil_copy_fsuse()
1345 new->fs_str = orig->fs_str; in cil_copy_fsuse()
1348 new->context_str = orig->context_str; in cil_copy_fsuse()
1350 cil_context_init(&new->context); in cil_copy_fsuse()
1351 cil_copy_fill_context(db, orig->context, new->context); in cil_copy_fsuse()
1354 *copy = new; in cil_copy_fsuse()
1359 int cil_copy_expr(struct cil_db *db, struct cil_list *orig, struct cil_list **new) in cil_copy_expr() argument
1364 *new = NULL; in cil_copy_expr()
1368 cil_list_init(new, orig->flavor); in cil_copy_expr()
1375 cil_list_append(*new, CIL_LIST, sub_list); in cil_copy_expr()
1379 cil_list_append(*new, CIL_STRING, curr->data); in cil_copy_expr()
1382 cil_list_append(*new, curr->flavor, curr->data); in cil_copy_expr()
1385 cil_list_append(*new, curr->flavor, curr->data); in cil_copy_expr()
1388 cil_list_append(*new, curr->flavor, curr->data); in cil_copy_expr()
1392 cil_list_append(*new, curr->flavor, curr->data); in cil_copy_expr()
1403 struct cil_constrain *new = NULL; in cil_copy_constrain() local
1405 cil_constrain_init(&new); in cil_copy_constrain()
1406 cil_copy_classperms_list(orig->classperms, &new->classperms); in cil_copy_constrain()
1408 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_constrain()
1409 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_constrain()
1411 *copy = new; in cil_copy_constrain()
1419 struct cil_validatetrans *new = NULL; in cil_copy_validatetrans() local
1421 cil_validatetrans_init(&new); in cil_copy_validatetrans()
1423 new->class_str = orig->class_str; in cil_copy_validatetrans()
1425 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_validatetrans()
1426 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_validatetrans()
1428 *copy = new; in cil_copy_validatetrans()
1436 struct cil_call *new = NULL; in cil_copy_call() local
1439 cil_call_init(&new); in cil_copy_call()
1441 new->macro_str = orig->macro_str; in cil_copy_call()
1442 new->macro = orig->macro; in cil_copy_call()
1445 cil_tree_init(&new->args_tree); in cil_copy_call()
1446 rc = cil_copy_ast(db, orig->args_tree->root, new->args_tree->root); in cil_copy_call()
1452 new->copied = orig->copied; in cil_copy_call()
1454 *copy = new; in cil_copy_call()
1459 cil_destroy_call(new); in cil_copy_call()
1471 struct cil_macro *new; in cil_copy_macro() local
1472 cil_macro_init(&new); in cil_copy_macro()
1474 cil_copy_list(orig->params, &new->params); in cil_copy_macro()
1477 *copy = new; in cil_copy_macro()
1536 struct cil_optional *new; in cil_copy_optional() local
1537 cil_optional_init(&new); in cil_copy_optional()
1538 *copy = new; in cil_copy_optional()
1546 void cil_copy_fill_ipaddr(struct cil_ipaddr *data, struct cil_ipaddr *new) in cil_copy_fill_ipaddr() argument
1548 new->family = data->family; in cil_copy_fill_ipaddr()
1549 memcpy(&new->ip, &data->ip, sizeof(data->ip)); in cil_copy_fill_ipaddr()
1555 struct cil_ipaddr *new = NULL; in cil_copy_ipaddr() local
1565 cil_ipaddr_init(&new); in cil_copy_ipaddr()
1566 cil_copy_fill_ipaddr(orig, new); in cil_copy_ipaddr()
1568 *copy = new; in cil_copy_ipaddr()
1576 struct cil_condblock *new = *copy; in cil_copy_condblock() local
1577 cil_condblock_init(&new); in cil_copy_condblock()
1578 new->flavor = orig->flavor; in cil_copy_condblock()
1579 *copy = new; in cil_copy_condblock()
1587 struct cil_booleanif *new = NULL; in cil_copy_boolif() local
1589 cil_boolif_init(&new); in cil_copy_boolif()
1591 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_boolif()
1592 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_boolif()
1593 new->preserved_tunable = orig->preserved_tunable; in cil_copy_boolif()
1595 *copy = new; in cil_copy_boolif()
1603 struct cil_tunableif *new = NULL; in cil_copy_tunif() local
1605 cil_tunif_init(&new); in cil_copy_tunif()
1607 cil_copy_expr(db, orig->str_expr, &new->str_expr); in cil_copy_tunif()
1608 cil_copy_expr(db, orig->datum_expr, &new->datum_expr); in cil_copy_tunif()
1610 *copy = new; in cil_copy_tunif()
1618 struct cil_default *new = NULL; in cil_copy_default() local
1620 cil_default_init(&new); in cil_copy_default()
1622 new->flavor = orig->flavor; in cil_copy_default()
1625 cil_copy_list(orig->class_strs, &new->class_strs); in cil_copy_default()
1628 new->object = orig->object; in cil_copy_default()
1630 *copy = new; in cil_copy_default()
1638 struct cil_defaultrange *new = NULL; in cil_copy_defaultrange() local
1640 cil_defaultrange_init(&new); in cil_copy_defaultrange()
1643 cil_copy_list(orig->class_strs, &new->class_strs); in cil_copy_defaultrange()
1646 new->object_range = orig->object_range; in cil_copy_defaultrange()
1648 *copy = new; in cil_copy_defaultrange()
1656 struct cil_handleunknown *new = NULL; in cil_copy_handleunknown() local
1658 cil_handleunknown_init(&new); in cil_copy_handleunknown()
1659 new->handle_unknown = orig->handle_unknown; in cil_copy_handleunknown()
1660 *copy = new; in cil_copy_handleunknown()
1668 struct cil_mls *new = NULL; in cil_copy_mls() local
1670 cil_mls_init(&new); in cil_copy_mls()
1671 new->value = orig->value; in cil_copy_mls()
1672 *copy = new; in cil_copy_mls()
1680 struct cil_bounds *new = NULL; in cil_copy_bounds() local
1682 cil_bounds_init(&new); in cil_copy_bounds()
1684 new->parent_str = orig->parent_str; in cil_copy_bounds()
1685 new->child_str = orig->child_str; in cil_copy_bounds()
1687 *copy = new; in cil_copy_bounds()
1695 struct cil_src_info *new = NULL; in cil_copy_src_info() local
1697 cil_src_info_init(&new); in cil_copy_src_info()
1699 new->is_cil = orig->is_cil; in cil_copy_src_info()
1700 new->path = orig->path; in cil_copy_src_info()
1702 *copy = new; in cil_copy_src_info()
1711 struct cil_tree_node *new = NULL; in __cil_copy_node_helper() local
2007 cil_tree_node_init(&new); in __cil_copy_node_helper()
2009 new->parent = parent; in __cil_copy_node_helper()
2010 new->line = orig->line; in __cil_copy_node_helper()
2011 new->hll_line = orig->hll_line; in __cil_copy_node_helper()
2012 new->flavor = orig->flavor; in __cil_copy_node_helper()
2013 new->data = data; in __cil_copy_node_helper()
2020 new->flavor = FLAVOR(data); in __cil_copy_node_helper()
2024 …nsert(symtab, ((struct cil_symtab_datum*)orig->data)->name, ((struct cil_symtab_datum*)data), new); in __cil_copy_node_helper()
2026 namespace = new; in __cil_copy_node_helper()
2038 if (param->flavor == new->flavor) { in __cil_copy_node_helper()
2039 if (param->str == ((struct cil_symtab_datum*)new->data)->name) { in __cil_copy_node_helper()
2040 …cil_tree_log(orig, CIL_ERR, "%s %s shadows a macro parameter", cil_node_to_string(new), ((struct c… in __cil_copy_node_helper()
2051 if (new->flavor == CIL_BLOCKINHERIT) { in __cil_copy_node_helper()
2052 blockinherit = new->data; in __cil_copy_node_helper()
2059 cil_list_append(blockinherit->block->bi_nodes, CIL_NODE, new); in __cil_copy_node_helper()
2064 parent->cl_head = new; in __cil_copy_node_helper()
2065 parent->cl_tail = new; in __cil_copy_node_helper()
2067 parent->cl_tail->next = new; in __cil_copy_node_helper()
2068 parent->cl_tail = new; in __cil_copy_node_helper()
2072 args->dest = new; in __cil_copy_node_helper()
2081 cil_tree_node_destroy(&new); in __cil_copy_node_helper()