SE Android | 8c48de1 | 2012-01-24 05:27:18 -0800 | [diff] [blame] | 1 | /* Functions used to define policy grammar components. */ |
| 2 | |
| 3 | #ifndef _POLICY_DEFINE_H_ |
| 4 | #define _POLICY_DEFINE_H_ |
| 5 | |
| 6 | /* |
| 7 | * We need the following so we have a valid error return code in yacc |
| 8 | * when we have a parse error for a conditional rule. We can't check |
| 9 | * for NULL (ie 0) because that is a potentially valid return. |
| 10 | */ |
| 11 | #define COND_ERR ((avrule_t *)-1) |
| 12 | |
| 13 | #define TRUE 1 |
| 14 | #define FALSE 0 |
| 15 | |
| 16 | avrule_t *define_cond_compute_type(int which); |
| 17 | avrule_t *define_cond_pol_list(avrule_t *avlist, avrule_t *stmt); |
| 18 | avrule_t *define_cond_te_avtab(int which); |
| 19 | avrule_t *define_cond_filename_trans(void); |
| 20 | cond_expr_t *define_cond_expr(uint32_t expr_type, void *arg1, void* arg2); |
| 21 | int define_attrib(void); |
| 22 | int define_attrib_role(void); |
| 23 | int define_av_perms(int inherits); |
Stephen Smalley | cd88c5c | 2012-02-21 14:27:00 -0500 | [diff] [blame] | 24 | int define_bool_tunable(int is_tunable); |
SE Android | 8c48de1 | 2012-01-24 05:27:18 -0800 | [diff] [blame] | 25 | int define_category(void); |
| 26 | int define_class(void); |
Stephen Smalley | ba8e992 | 2012-09-25 10:57:09 -0400 | [diff] [blame] | 27 | int define_default_user(int which); |
| 28 | int define_default_role(int which); |
Stephen Smalley | 968aed0 | 2013-10-30 15:38:49 -0400 | [diff] [blame] | 29 | int define_default_type(int which); |
Stephen Smalley | ba8e992 | 2012-09-25 10:57:09 -0400 | [diff] [blame] | 30 | int define_default_range(int which); |
SE Android | 8c48de1 | 2012-01-24 05:27:18 -0800 | [diff] [blame] | 31 | int define_common_perms(void); |
| 32 | int define_compute_type(int which); |
| 33 | int define_conditional(cond_expr_t *expr, avrule_t *t_list, avrule_t *f_list ); |
| 34 | int define_constraint(constraint_expr_t *expr); |
| 35 | int define_dominance(void); |
| 36 | int define_fs_context(unsigned int major, unsigned int minor); |
| 37 | int define_fs_use(int behavior); |
| 38 | int define_genfs_context(int has_type); |
| 39 | int define_initial_sid_context(void); |
| 40 | int define_initial_sid(void); |
| 41 | int define_ipv4_node_context(void); |
| 42 | int define_ipv6_node_context(void); |
| 43 | int define_level(void); |
| 44 | int define_netif_context(void); |
| 45 | int define_permissive(void); |
| 46 | int define_polcap(void); |
| 47 | int define_port_context(unsigned int low, unsigned int high); |
| 48 | int define_pirq_context(unsigned int pirq); |
| 49 | int define_iomem_context(unsigned long low, unsigned long high); |
| 50 | int define_ioport_context(unsigned long low, unsigned long high); |
| 51 | int define_pcidevice_context(unsigned long device); |
| 52 | int define_range_trans(int class_specified); |
| 53 | int define_role_allow(void); |
| 54 | int define_role_trans(int class_specified); |
| 55 | int define_role_types(void); |
| 56 | int define_role_attr(void); |
| 57 | int define_roleattribute(void); |
| 58 | int define_filename_trans(void); |
| 59 | int define_sens(void); |
| 60 | int define_te_avtab(int which); |
| 61 | int define_typealias(void); |
| 62 | int define_typeattribute(void); |
| 63 | int define_typebounds(void); |
| 64 | int define_type(int alias); |
| 65 | int define_user(void); |
| 66 | int define_validatetrans(constraint_expr_t *expr); |
| 67 | int insert_id(char *id,int push); |
| 68 | int insert_separator(int push); |
| 69 | role_datum_t *define_role_dom(role_datum_t *r); |
| 70 | role_datum_t *merge_roles_dom(role_datum_t *r1,role_datum_t *r2); |
| 71 | uintptr_t define_cexpr(uint32_t expr_type, uintptr_t arg1, uintptr_t arg2); |
| 72 | |
| 73 | #endif /* _POLICY_DEFINE_H_ */ |