Lines Matching refs:orig
100 struct cil_block *orig = data;
101 char *key = orig->datum.name;
118 struct cil_blockabstract *orig = data;
123 new->block_str = orig->block_str;
132 struct cil_blockinherit *orig = data;
137 new->block_str = orig->block_str;
138 new->block = orig->block;
147 struct cil_policycap *orig = data;
148 char *key = orig->datum.name;
165 struct cil_perm *orig = data;
166 char *key = orig->datum.name;
181 void cil_copy_classperms(struct cil_classperms *orig, struct cil_classperms **new)
184 (*new)->class_str = orig->class_str;
185 cil_copy_list(orig->perm_strs, &((*new)->perm_strs));
188 void cil_copy_classperms_set(struct cil_classperms_set *orig, struct cil_classperms_set **new)
191 (*new)->set_str = orig->set_str;
194 void cil_copy_classperms_list(struct cil_list *orig, struct cil_list **new)
198 if (orig == NULL) {
203 cil_list_for_each(orig_item, orig) {
218 struct cil_classmapping *orig = data;
223 new->map_class_str = orig->map_class_str;
224 new->map_perm_str = orig->map_perm_str;
226 cil_copy_classperms_list(orig->classperms, &new->classperms);
235 struct cil_class *orig = data;
237 char *key = orig->datum.name;
257 struct cil_classorder *orig = data;
261 if (orig->class_list_str != NULL) {
262 cil_copy_list(orig->class_list_str, &new->class_list_str);
272 struct cil_classpermission *orig = data;
274 char *key = orig->datum.name;
287 cil_copy_classperms_list(orig->classperms, &new->classperms);
296 struct cil_classpermissionset *orig = data;
301 new->set_str = orig->set_str;
303 cil_copy_classperms_list(orig->classperms, &new->classperms);
312 struct cil_classcommon *orig = data;
317 new->class_str = orig->class_str;
318 new->common_str = orig->common_str;
327 struct cil_sid *orig = data;
328 char *key = orig->datum.name;
345 struct cil_sidcontext *orig = data;
350 if (orig->context_str != NULL) {
351 new->context_str = orig->context_str;
354 cil_copy_fill_context(db, orig->context, new->context);
364 struct cil_sidorder *orig = data;
368 if (orig->sid_list_str != NULL) {
369 cil_copy_list(orig->sid_list_str, &new->sid_list_str);
379 struct cil_user *orig = data;
380 char *key = orig->datum.name;
397 struct cil_userattribute *orig = data;
399 char *key = orig->datum.name;
415 struct cil_userattributeset *orig = data;
420 new->attr_str = orig->attr_str;
422 cil_copy_expr(db, orig->str_expr, &new->str_expr);
423 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
432 struct cil_userrole *orig = data;
437 new->user_str = orig->user_str;
438 new->role_str = orig->role_str;
447 struct cil_userlevel *orig = data;
452 new->user_str = orig->user_str;
454 if (orig->level_str != NULL) {
455 new->level_str = orig->level_str;
457 cil_copy_fill_level(db, orig->level, &new->level);
467 struct cil_userrange *orig = data;
472 new->user_str = orig->user_str;
474 if (orig->range_str != NULL) {
475 new->range_str = orig->range_str;
478 cil_copy_fill_levelrange(db, orig->range, new->range);
488 struct cil_userprefix *orig = data;
493 new->user_str = orig->user_str;
494 new->prefix_str = orig->prefix_str;
503 struct cil_role *orig = data;
504 char *key = orig->datum.name;
521 struct cil_roletype *orig = data;
526 new->role_str = orig->role_str;
527 new->type_str = orig->type_str;
536 struct cil_roleattribute *orig = data;
537 char *key = orig->datum.name;
554 struct cil_roleattributeset *orig = data;
559 new->attr_str = orig->attr_str;
561 cil_copy_expr(db, orig->str_expr, &new->str_expr);
562 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
571 struct cil_roleallow *orig = data;
576 new->src_str = orig->src_str;
577 new->tgt_str = orig->tgt_str;
586 struct cil_type *orig = data;
587 char *key = orig->datum.name;
604 struct cil_typepermissive *orig = data;
609 new->type_str = orig->type_str;
618 struct cil_typeattribute *orig = data;
619 char *key = orig->datum.name;
636 struct cil_typeattributeset *orig = data;
641 new->attr_str = orig->attr_str;
643 cil_copy_expr(db, orig->str_expr, &new->str_expr);
644 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
653 struct cil_expandtypeattribute *orig = data;
659 if (orig->attr_strs != NULL) {
660 cil_copy_list(orig->attr_strs, &new->attr_strs);
663 if (orig->attr_datums != NULL) {
664 cil_copy_list(orig->attr_datums, &new->attr_datums);
667 new->expand = orig->expand;
676 struct cil_alias *orig = data;
678 char *key = orig->datum.name;
696 struct cil_aliasactual *orig = data;
701 new->alias_str = orig->alias_str;
702 new->actual_str = orig->actual_str;
711 struct cil_roletransition *orig = data;
716 new->src_str = orig->src_str;
717 new->tgt_str = orig->tgt_str;
718 new->obj_str = orig->obj_str;
719 new->result_str = orig->result_str;
728 struct cil_nametypetransition *orig = data;
733 new->src_str = orig->src_str;
734 new->tgt_str = orig->tgt_str;
735 new->obj_str = orig->obj_str;
736 new->name_str = orig->name_str;
737 new->result_str = orig->result_str;
747 struct cil_rangetransition *orig = data;
752 new->src_str = orig->src_str;
753 new->exec_str = orig->exec_str;
754 new->obj_str = orig->obj_str;
756 if (orig->range_str != NULL) {
757 new->range_str = orig->range_str;
760 cil_copy_fill_levelrange(db, orig->range, new->range);
770 struct cil_bool *orig = data;
772 char *key = orig->datum.name;
782 new->value = orig->value;
790 struct cil_tunable *orig = data;
792 char *key = orig->datum.name;
802 new->value = orig->value;
808 void cil_copy_fill_permissionx(struct cil_db *db, struct cil_permissionx *orig, struct cil_permissionx *new)
810 new->kind = orig->kind;
811 new->obj_str = orig->obj_str;
812 cil_copy_expr(db, orig->expr_str, &new->expr_str);
817 struct cil_avrule *orig = data;
822 new->is_extended = orig->is_extended;
823 new->rule_kind = orig->rule_kind;
824 new->src_str = orig->src_str;
825 new->tgt_str = orig->tgt_str;
828 cil_copy_classperms_list(orig->perms.classperms, &new->perms.classperms);
831 new->perms.x.permx_str = orig->perms.x.permx_str;
834 cil_copy_fill_permissionx(db, orig->perms.x.permx, new->perms.x.permx);
845 struct cil_permissionx *orig = data;
847 char *key = orig->datum.name;
858 cil_copy_fill_permissionx(db, orig, new);
867 struct cil_type_rule *orig = data;
872 new->rule_kind = orig->rule_kind;
873 new->src_str = orig->src_str;
874 new->tgt_str = orig->tgt_str;
875 new->obj_str = orig->obj_str;
876 new->result_str = orig->result_str;
885 struct cil_sens *orig = data;
886 char *key = orig->datum.name;
903 struct cil_cat *orig = data;
904 char *key = orig->datum.name;
919 void cil_copy_cats(struct cil_db *db, struct cil_cats *orig, struct cil_cats **new)
922 cil_copy_expr(db, orig->str_expr, &(*new)->str_expr);
923 cil_copy_expr(db, orig->datum_expr, &(*new)->datum_expr);
928 struct cil_catset *orig = data;
930 char *key = orig->datum.name;
941 cil_copy_cats(db, orig->cats, &new->cats);
950 struct cil_senscat *orig = data;
955 new->sens_str = orig->sens_str;
957 cil_copy_cats(db, orig->cats, &new->cats);
966 struct cil_catorder *orig = data;
970 if (orig->cat_list_str != NULL) {
971 cil_copy_list(orig->cat_list_str, &new->cat_list_str);
981 struct cil_sensorder *orig = data;
985 if (orig->sens_list_str != NULL) {
986 cil_copy_list(orig->sens_list_str, &new->sens_list_str);
994 void cil_copy_fill_level(struct cil_db *db, struct cil_level *orig, struct cil_level **new)
998 (*new)->sens_str = orig->sens_str;
1000 if (orig->cats != NULL) {
1001 cil_copy_cats(db, orig->cats, &(*new)->cats);
1007 struct cil_level *orig = data;
1009 char *key = orig->datum.name;
1020 cil_copy_fill_level(db, orig, &new);
1044 struct cil_levelrange *orig = data;
1046 char *key = orig->datum.name;
1058 cil_copy_fill_levelrange(db, orig, new);
1081 struct cil_context *orig = data;
1083 char *key = orig->datum.name;
1095 cil_copy_fill_context(db, orig, new);
1104 struct cil_netifcon *orig = data;
1109 new->interface_str = orig->interface_str;
1111 if (orig->if_context_str != NULL) {
1112 new->if_context_str = orig->if_context_str;
1115 cil_copy_fill_context(db, orig->if_context, new->if_context);
1118 if (orig->packet_context_str != NULL) {
1119 new->packet_context_str = orig->packet_context_str;
1122 cil_copy_fill_context(db, orig->packet_context, new->packet_context);
1132 struct cil_genfscon *orig = data;
1137 new->fs_str = orig->fs_str;
1138 new->path_str = orig->path_str;
1140 if (orig->context_str != NULL) {
1141 new->context_str = orig->context_str;
1144 cil_copy_fill_context(db, orig->context, new->context);
1154 struct cil_filecon *orig = data;
1159 new->path_str = orig->path_str;
1160 new->type = orig->type;
1162 if (orig->context_str != NULL) {
1163 new->context_str = orig->context_str;
1164 } else if (orig->context != NULL) {
1166 cil_copy_fill_context(db, orig->context, new->context);
1176 struct cil_nodecon *orig = data;
1181 if (orig->addr_str != NULL) {
1182 new->addr_str = orig->addr_str;
1185 cil_copy_fill_ipaddr(orig->addr, new->addr);
1188 if (orig->mask_str != NULL) {
1189 new->mask_str = orig->mask_str;
1192 cil_copy_fill_ipaddr(orig->mask, new->mask);
1195 if (orig->context_str != NULL) {
1196 new->context_str = orig->context_str;
1199 cil_copy_fill_context(db, orig->context, new->context);
1209 struct cil_ibpkeycon *orig = data;
1214 new->subnet_prefix_str = orig->subnet_prefix_str;
1215 new->pkey_low = orig->pkey_low;
1216 new->pkey_high = orig->pkey_high;
1218 if (orig->context_str) {
1219 new->context_str = orig->context_str;
1222 cil_copy_fill_context(db, orig->context, new->context);
1232 struct cil_ibendportcon *orig = data;
1237 new->dev_name_str = orig->dev_name_str;
1238 new->port = orig->port;
1240 if (orig->context_str) {
1241 new->context_str = orig->context_str;
1244 cil_copy_fill_context(db, orig->context, new->context);
1254 struct cil_portcon *orig = data;
1259 new->proto = orig->proto;
1260 new->port_low = orig->port_low;
1261 new->port_high = orig->port_high;
1263 if (orig->context_str != NULL) {
1264 new->context_str = orig->context_str;
1267 cil_copy_fill_context(db, orig->context, new->context);
1277 struct cil_pirqcon *orig = data;
1282 new->pirq = orig->pirq;
1284 if (orig->context_str != NULL) {
1285 new->context_str = orig->context_str;
1288 cil_copy_fill_context(db, orig->context, new->context);
1298 struct cil_iomemcon *orig = data;
1303 new->iomem_low = orig->iomem_low;
1304 new->iomem_high = orig->iomem_high;
1306 if (orig->context_str != NULL) {
1307 new->context_str = orig->context_str;
1310 cil_copy_fill_context(db, orig->context, new->context);
1320 struct cil_ioportcon *orig = data;
1325 new->ioport_low = orig->ioport_low;
1326 new->ioport_high = orig->ioport_high;
1328 if (orig->context_str != NULL) {
1329 new->context_str = orig->context_str;
1332 cil_copy_fill_context(db, orig->context, new->context);
1342 struct cil_pcidevicecon *orig = data;
1347 new->dev = orig->dev;
1349 if (orig->context_str != NULL) {
1350 new->context_str = orig->context_str;
1353 cil_copy_fill_context(db, orig->context, new->context);
1363 struct cil_devicetreecon *orig = data;
1368 new->path = orig->path;
1370 if (orig
1371 new->context_str = orig->context_str;
1374 cil_copy_fill_context(db, orig->context, new->context);
1384 struct cil_fsuse *orig = data;
1389 new->type = orig->type;
1390 new->fs_str = orig->fs_str;
1392 if (orig->context_str != NULL) {
1393 new->context_str = orig->context_str;
1396 cil_copy_fill_context(db, orig->context, new->context);
1404 int cil_copy_expr(struct cil_db *db, struct cil_list *orig, struct cil_list **new)
1408 if (orig == NULL) {
1413 cil_list_init(new, orig->flavor);
1415 cil_list_for_each(curr, orig) {
1447 struct cil_constrain *orig = data;
1451 cil_copy_classperms_list(orig->classperms, &new->classperms);
1453 cil_copy_expr(db, orig->str_expr, &new->str_expr);
1454 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
1463 struct cil_validatetrans *orig = data;
1468 new->class_str = orig->class_str;
1470 cil_copy_expr(db, orig->str_expr, &new->str_expr);
1471 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
1480 struct cil_call *orig = data;
1486 new->macro_str = orig->macro_str;
1487 new->macro = orig->macro;
1489 if (orig->args_tree != NULL) {
1491 rc = cil_copy_ast(db, orig->args_tree->root, new->args_tree->root);
1497 new->copied = orig->copied;
1510 struct cil_macro *orig = data;
1511 char *key = orig->datum.name;
1518 if (orig->params != NULL) {
1519 cil_copy_list(orig->params, &new->params);
1534 if (orig->params != NULL) {
1535 curr_orig = orig->params->head;
1575 struct cil_optional *orig = data;
1576 char *key = orig->datum.name;
1599 struct cil_ipaddr *orig = data;
1601 char * key = orig->datum.name;
1611 cil_copy_fill_ipaddr(orig, new);
1620 struct cil_condblock *orig = data;
1623 new->flavor = orig->flavor;
1631 struct cil_booleanif *orig = data;
1636 cil_copy_expr(db, orig->str_expr, &new->str_expr);
1637 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
1638 new->preserved_tunable = orig->preserved_tunable;
1647 struct cil_tunableif *orig = data;
1652 cil_copy_expr(db, orig->str_expr, &new->str_expr);
1653 cil_copy_expr(db, orig->datum_expr, &new->datum_expr);
1662 struct cil_default *orig = data;
1667 new->flavor = orig->flavor;
1669 if (orig->class_strs != NULL) {
1670 cil_copy_list(orig->class_strs, &new->class_strs);
1673 new->object = orig->object;
1682 struct cil_defaultrange *orig = data;
1687 if (orig->class_strs != NULL) {
1688 cil_copy_list(orig->class_strs, &new->class_strs);
1691 new->object_range = orig->object_range;
1700 struct cil_handleunknown *orig = data;
1704 new->handle_unknown = orig->handle_unknown;
1712 struct cil_mls *orig = data;
1716 new->value = orig->value;
1724 struct cil_bounds *orig = data;
1729 new->parent_str = orig->parent_str;
1730 new->child_str = orig->child_str;
1739 struct cil_src_info *orig = data;
1744 new->is_cil = orig->is_cil;
1745 new->path = orig->path;
1752 int __cil_copy_node_helper(struct cil_tree_node *orig, __attribute__((unused)) uint32_t *finished, void *extra_args)
1767 if (orig == NULL || extra_args == NULL) {
1776 switch (orig->flavor) {
2044 if (orig->flavor >= CIL_MIN_DECLARATIVE) {
2045 rc = cil_flavor_to_symtab_index(orig->flavor, &sym_index);
2056 rc = (*copy_func)(db, orig->data, &data, symtab);
2061 new->line = orig->line;
2062 new->hll_line = orig->hll_line;
2063 new->flavor = orig->flavor;
2066 if (orig->flavor >= CIL_MIN_DECLARATIVE) {
2068 if (DATUM(data)->nodes->head && FLAVOR(data) != orig->flavor) {
2069 cil_tree_log(orig, CIL_ERR, "Incompatible flavor when trying to copy %s", DATUM(data)->name);
2075 rc = cil_symtab_insert(symtab, ((struct cil_symtab_datum*)orig->data)->name, ((struct cil_symtab_datum*)data), new);
2091 cil_tree_log(orig, CIL_ERR, "%s %s shadows a macro parameter", cil_node_to_string(new), ((struct cil_symtab_datum*)orig->data)->name);
2122 if (orig->cl_head != NULL) {
2136 int __cil_copy_last_child_helper(__attribute__((unused)) struct cil_tree_node *orig, void *extra_args)
2153 int cil_copy_ast(struct cil_db *db, struct cil_tree_node *orig, struct cil_tree_node *dest)
2161 rc = cil_tree_walk(orig, __cil_copy_node_helper, NULL, __cil_copy_last_child_helper, &extra_args);