| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#ifndef CIL_VERIFY_H_ |
| 31 |
#define CIL_VERIFY_H_ |
| 32 |
|
| 33 |
#include <stdint.h> |
| 34 |
|
| 35 |
#include "cil_internal.h" |
| 36 |
#include "cil_flavor.h" |
| 37 |
#include "cil_tree.h" |
| 38 |
#include "cil_list.h" |
| 39 |
|
| 40 |
enum cil_syntax { |
| 41 |
CIL_SYN_STRING = 1 << 0, |
| 42 |
CIL_SYN_LIST = 1 << 1, |
| 43 |
CIL_SYN_EMPTY_LIST = 1 << 2, |
| 44 |
CIL_SYN_N_LISTS = 1 << 3, |
| 45 |
CIL_SYN_N_STRINGS = 1 << 4, |
| 46 |
CIL_SYN_END = 1 << 5 |
| 47 |
}; |
| 48 |
|
| 49 |
struct cil_args_verify { |
| 50 |
struct cil_db *db; |
| 51 |
struct cil_complex_symtab *csymtab; |
| 52 |
int *avrule_cnt; |
| 53 |
int *handleunknown; |
| 54 |
int *mls; |
| 55 |
int *nseuserdflt; |
| 56 |
int *pass; |
| 57 |
}; |
| 58 |
|
| 59 |
int __cil_verify_name(const char *name); |
| 60 |
int __cil_verify_syntax(struct cil_tree_node *parse_current, enum cil_syntax s[], int len); |
| 61 |
int cil_verify_expr_syntax(struct cil_tree_node *current, enum cil_flavor op, enum cil_flavor expr_flavor); |
| 62 |
int cil_verify_constraint_leaf_expr_syntax(enum cil_flavor l_flavor, enum cil_flavor r_flavor, enum cil_flavor op, enum cil_flavor expr_flavor); |
| 63 |
int cil_verify_constraint_expr_syntax(struct cil_tree_node *current, enum cil_flavor op); |
| 64 |
int cil_verify_no_self_reference(struct cil_symtab_datum *datum, struct cil_list *datum_list); |
| 65 |
int __cil_verify_ranges(struct cil_list *list); |
| 66 |
int __cil_verify_ordered_node_helper(struct cil_tree_node *node, uint32_t *finished, void *extra_args); |
| 67 |
int __cil_verify_ordered(struct cil_tree_node *current, enum cil_flavor flavor); |
| 68 |
int __cil_verify_initsids(struct cil_list *sids); |
| 69 |
int __cil_verify_senscat(struct cil_sens *sens, struct cil_cat *cat); |
| 70 |
int __cil_verify_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, void *extra_args); |
| 71 |
int __cil_pre_verify_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, void *extra_args); |
| 72 |
|
| 73 |
#endif |