2008-08-19 19:30:36 +00:00
|
|
|
/* Functions used to define policy grammar components. */
|
|
|
|
|
|
|
|
#ifndef _POLICY_DEFINE_H_
|
|
|
|
#define _POLICY_DEFINE_H_
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We need the following so we have a valid error return code in yacc
|
|
|
|
* when we have a parse error for a conditional rule. We can't check
|
|
|
|
* for NULL (ie 0) because that is a potentially valid return.
|
|
|
|
*/
|
|
|
|
#define COND_ERR ((avrule_t *)-1)
|
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
|
|
|
|
|
|
|
avrule_t *define_cond_compute_type(int which);
|
2024-01-22 13:55:07 +00:00
|
|
|
avrule_t *define_cond_pol_list(avrule_t *avlist, avrule_t *sl);
|
2008-08-19 19:30:36 +00:00
|
|
|
avrule_t *define_cond_te_avtab(int which);
|
2011-03-28 18:00:19 +00:00
|
|
|
avrule_t *define_cond_filename_trans(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
cond_expr_t *define_cond_expr(uint32_t expr_type, void *arg1, void* arg2);
|
|
|
|
int define_attrib(void);
|
2011-07-25 01:23:54 +00:00
|
|
|
int define_attrib_role(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_av_perms(int inherits);
|
2011-09-01 03:29:41 +00:00
|
|
|
int define_bool_tunable(int is_tunable);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_category(void);
|
|
|
|
int define_class(void);
|
2011-12-05 18:28:51 +00:00
|
|
|
int define_default_user(int which);
|
|
|
|
int define_default_role(int which);
|
2012-12-18 16:41:25 +00:00
|
|
|
int define_default_type(int which);
|
2011-12-05 18:28:51 +00:00
|
|
|
int define_default_range(int which);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_common_perms(void);
|
2023-07-25 15:15:30 +00:00
|
|
|
int define_compute_type(int which);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_conditional(cond_expr_t *expr, avrule_t *t_list, avrule_t *f_list );
|
|
|
|
int define_constraint(constraint_expr_t *expr);
|
|
|
|
int define_dominance(void);
|
|
|
|
int define_fs_context(unsigned int major, unsigned int minor);
|
|
|
|
int define_fs_use(int behavior);
|
|
|
|
int define_genfs_context(int has_type);
|
|
|
|
int define_initial_sid_context(void);
|
|
|
|
int define_initial_sid(void);
|
|
|
|
int define_ipv4_node_context(void);
|
2024-05-08 17:04:22 +00:00
|
|
|
int define_ipv4_cidr_node_context(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_ipv6_node_context(void);
|
2024-05-08 17:04:22 +00:00
|
|
|
int define_ipv6_cidr_node_context(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_level(void);
|
|
|
|
int define_netif_context(void);
|
|
|
|
int define_permissive(void);
|
|
|
|
int define_polcap(void);
|
2017-05-22 13:08:23 +00:00
|
|
|
int define_ibpkey_context(unsigned int low, unsigned int high);
|
2017-05-22 13:08:26 +00:00
|
|
|
int define_ibendport_context(unsigned int port);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_port_context(unsigned int low, unsigned int high);
|
2009-09-29 14:06:26 +00:00
|
|
|
int define_pirq_context(unsigned int pirq);
|
2015-03-17 20:43:23 +00:00
|
|
|
int define_iomem_context(uint64_t low, uint64_t high);
|
2009-09-29 14:06:26 +00:00
|
|
|
int define_ioport_context(unsigned long low, unsigned long high);
|
|
|
|
int define_pcidevice_context(unsigned long device);
|
2015-03-17 20:43:24 +00:00
|
|
|
int define_devicetree_context(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_range_trans(int class_specified);
|
|
|
|
int define_role_allow(void);
|
2011-03-25 05:51:59 +00:00
|
|
|
int define_role_trans(int class_specified);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_role_types(void);
|
2011-07-25 01:23:54 +00:00
|
|
|
int define_role_attr(void);
|
|
|
|
int define_roleattribute(void);
|
2023-07-25 15:15:30 +00:00
|
|
|
int define_filename_trans(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_sens(void);
|
|
|
|
int define_te_avtab(int which);
|
2015-06-12 16:01:12 +00:00
|
|
|
int define_te_avtab_extended_perms(int which);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_typealias(void);
|
|
|
|
int define_typeattribute(void);
|
2008-10-08 10:56:51 +00:00
|
|
|
int define_typebounds(void);
|
2008-08-19 19:30:36 +00:00
|
|
|
int define_type(int alias);
|
|
|
|
int define_user(void);
|
|
|
|
int define_validatetrans(constraint_expr_t *expr);
|
2017-05-04 21:36:49 +00:00
|
|
|
int expand_attrib(void);
|
2014-09-14 21:41:46 +00:00
|
|
|
int insert_id(const char *id,int push);
|
2008-08-19 19:30:36 +00:00
|
|
|
int insert_separator(int push);
|
|
|
|
uintptr_t define_cexpr(uint32_t expr_type, uintptr_t arg1, uintptr_t arg2);
|
|
|
|
|
|
|
|
#endif /* _POLICY_DEFINE_H_ */
|