Home | History | Annotate | Download | only in src

Lines Matching full:file_index

81 	uint32_t *file_index;
85 int cil_expr_to_policy(FILE **file_arr, uint32_t file_index, struct cil_list *expr);
417 void cil_cats_to_policy(FILE **file_arr, uint32_t file_index, struct cil_cats *cats)
419 cil_expr_to_policy(file_arr, file_index, cats->datum_expr);
422 void cil_level_to_policy(FILE **file_arr, uint32_t file_index, struct cil_level *level)
426 fprintf(file_arr[file_index], "%s", sens_str);
428 fprintf(file_arr[file_index], ":");
429 cil_cats_to_policy(file_arr, file_index, level->cats);
433 void cil_levelrange_to_policy(FILE **file_arr, uint32_t file_index, struct cil_levelrange *lvlrange)
438 cil_level_to_policy(file_arr, file_index, low);
439 fprintf(file_arr[file_index], "-");
440 cil_level_to_policy(file_arr, file_index, high);
443 void cil_context_to_policy(FILE **file_arr, uint32_t file_index, struct cil_context *context)
450 fprintf(file_arr[file_index], "%s:%s:%s:", user_str, role_str, type_str);
451 cil_levelrange_to_policy(file_arr, file_index, lvlrange);
454 void cil_perms_to_policy(FILE **file_arr, uint32_t file_index, struct cil_list *list)
458 fprintf(file_arr[file_index], " {");
462 cil_perms_to_policy(file_arr, file_index, curr->data);
465 fprintf(file_arr[file_index], " %s", (char *)curr->data);
468 fprintf(file_arr[file_index], " %s", ((struct cil_symtab_datum *)curr->data)->name);
494 fprintf(file_arr[file_index], " %s", op_str);
502 fprintf(file_arr[file_index], " }");
533 void cil_constrain_to_policy(FILE **file_arr, __attribute__((unused)) uint32_t file_index, struct cil_constrain *cons, enum cil_flavor flavor)
546 void cil_avrule_to_policy_helper(FILE **file_arr, uint32_t file_index, const char *kind, const char *src, const char *tgt, struct cil_list *classperms)
554 fprintf(file_arr[file_index
555 cil_perms_to_policy(file_arr, file_index, cp->perms);
556 fprintf(file_arr[file_index], ";\n");
561 cil_avrule_to_policy_helper(file_arr, file_index, kind, src, tgt, cmp->classperms);
569 cil_avrule_to_policy_helper(file_arr, file_index, kind, src, tgt, j->data);
575 int cil_avrule_to_policy(FILE **file_arr, uint32_t file_index, struct cil_avrule *rule)
601 cil_avrule_to_policy_helper(file_arr, file_index, kind_str, src_str, tgt_str, rule->perms.classperms);
606 int cil_typerule_to_policy(FILE **file_arr, __attribute__((unused)) uint32_t file_index, struct cil_type_rule *rule)
631 int cil_nametypetransition_to_policy(FILE **file_arr, uint32_t file_index, struct cil_nametypetransition *nametypetrans)
638 fprintf(file_arr[file_index], "type_transition %s %s : %s %s %s;\n", src_str, tgt_str, obj_str, result_str, nametypetrans->name_str);
812 int cil_expr_to_policy(FILE **file_arr, uint32_t file_index, struct cil_list *expr)
821 fprintf(file_arr[file_index], "%s", str_out);
835 uint32_t *file_index;
839 file_index = args->file_index;
843 rc = cil_avrule_to_policy(file_arr, *file_index, (struct cil_avrule*)node->data);
850 rc = cil_typerule_to_policy(file_arr, *file_index, (struct cil_type_rule*)node->data);
857 fprintf(file_arr[*file_index], "else {\n");
872 uint32_t *file_index;
876 file_index = args->file_index;
879 fprintf(file_arr[*file_index], "}\n");
885 int cil_booleanif_to_policy(FILE **file_arr, uint32_t file_index, struct cil_tree_node *node)
896 extra_args.file_index = &file_index;;
898 fprintf(file_arr[file_index], "if ");
900 rc = cil_expr_to_policy(file_arr, file_index, expr);
924 fprintf(file_arr[file_index], "{\n");
932 fprintf(file_arr[file_index], "}\n");
935 fprintf(file_arr[file_index], "else {\n");
941 fprintf(file_arr[file_index], "}\n");