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