Home | History | Annotate | Download | only in checkpolicy
      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);
     24 int define_bool_tunable(int is_tunable);
     25 int define_category(void);
     26 int define_class(void);
     27 int define_default_user(int which);
     28 int define_default_role(int which);
     29 int define_default_range(int which);
     30 int define_common_perms(void);
     31 int define_compute_type(int which);
     32 int define_conditional(cond_expr_t *expr, avrule_t *t_list, avrule_t *f_list );
     33 int define_constraint(constraint_expr_t *expr);
     34 int define_dominance(void);
     35 int define_fs_context(unsigned int major, unsigned int minor);
     36 int define_fs_use(int behavior);
     37 int define_genfs_context(int has_type);
     38 int define_initial_sid_context(void);
     39 int define_initial_sid(void);
     40 int define_ipv4_node_context(void);
     41 int define_ipv6_node_context(void);
     42 int define_level(void);
     43 int define_netif_context(void);
     44 int define_permissive(void);
     45 int define_polcap(void);
     46 int define_port_context(unsigned int low, unsigned int high);
     47 int define_pirq_context(unsigned int pirq);
     48 int define_iomem_context(unsigned long low, unsigned long high);
     49 int define_ioport_context(unsigned long low, unsigned long high);
     50 int define_pcidevice_context(unsigned long device);
     51 int define_range_trans(int class_specified);
     52 int define_role_allow(void);
     53 int define_role_trans(int class_specified);
     54 int define_role_types(void);
     55 int define_role_attr(void);
     56 int define_roleattribute(void);
     57 int define_filename_trans(void);
     58 int define_sens(void);
     59 int define_te_avtab(int which);
     60 int define_typealias(void);
     61 int define_typeattribute(void);
     62 int define_typebounds(void);
     63 int define_type(int alias);
     64 int define_user(void);
     65 int define_validatetrans(constraint_expr_t *expr);
     66 int insert_id(char *id,int push);
     67 int insert_separator(int push);
     68 role_datum_t *define_role_dom(role_datum_t *r);
     69 role_datum_t *merge_roles_dom(role_datum_t *r1,role_datum_t *r2);
     70 uintptr_t define_cexpr(uint32_t expr_type, uintptr_t arg1, uintptr_t arg2);
     71 
     72 #endif /* _POLICY_DEFINE_H_ */
     73