Home
last modified time | relevance | path

Searched refs:policydb_t (Results 1 – 25 of 69) sorted by relevance

123

/third_party/selinux/libsepol/cil/src/
Dcil_binary.h74 int cil_common_to_policydb(policydb_t *pdb, struct cil_class *cil_common, common_datum_t **common_o…
84 int cil_class_to_policydb(policydb_t *pdb, struct cil_class *cil_class);
94 int cil_role_to_policydb(policydb_t *pdb, struct cil_role *cil_role);
105 int cil_roletype_to_policydb(policydb_t *pdb, const struct cil_db *db, struct cil_role *role);
115 int cil_type_to_policydb(policydb_t *pdb, struct cil_type *cil_type, void *type_value_to_cil[]);
125 int cil_typealias_to_policydb(policydb_t *pdb, struct cil_alias *cil_alias);
137 int cil_typepermissive_to_policydb(policydb_t *pdb, struct cil_typepermissive *cil_typeperm);
147 int cil_typeattribute_to_policydb(policydb_t *pdb, struct cil_typeattribute *cil_attr, void *type_v…
162 int cil_typeattribute_to_bitmap(policydb_t *pdb, const struct cil_db *cdb, struct cil_typeattribute…
172 int cil_policycap_to_policydb(policydb_t *pdb, struct cil_policycap *cil_polcap);
[all …]
Dcil_binary.c64 policydb_t *pdb;
74 policydb_t *pdb;
79 static int __cil_get_sepol_user_datum(policydb_t *pdb, struct cil_symtab_datum *datum, user_datum_t… in __cil_get_sepol_user_datum()
90 static int __cil_get_sepol_role_datum(policydb_t *pdb, struct cil_symtab_datum *datum, role_datum_t… in __cil_get_sepol_role_datum()
101 static int __cil_get_sepol_type_datum(policydb_t *pdb, struct cil_symtab_datum *datum, type_datum_t… in __cil_get_sepol_type_datum()
112 static int __cil_get_sepol_class_datum(policydb_t *pdb, struct cil_symtab_datum *datum, class_datum… in __cil_get_sepol_class_datum()
123 static int __cil_get_sepol_cat_datum(policydb_t *pdb, struct cil_symtab_datum *datum, cat_datum_t *… in __cil_get_sepol_cat_datum()
134 static int __cil_get_sepol_level_datum(policydb_t *pdb, struct cil_symtab_datum *datum, level_datum… in __cil_get_sepol_level_datum()
239 int cil_common_to_policydb(policydb_t *pdb, struct cil_class *cil_common, common_datum_t **common_o… in cil_common_to_policydb()
287 static int cil_classorder_to_policydb(policydb_t *pdb, const struct cil_db *db, struct cil_class *c… in cil_classorder_to_policydb()
[all …]
/third_party/selinux/libsepol/tests/
Dtest-expander.c48 policydb_t role_expanded;
49 policydb_t user_expanded;
50 policydb_t base_expanded2;
51 static policydb_t basemod;
52 static policydb_t basemod2;
53 static policydb_t mod2;
54 static policydb_t base_expanded;
55 static policydb_t base_only_mod;
56 static policydb_t base_only_expanded;
57 static policydb_t role_basemod;
[all …]
Dtest-common.c32 void test_sym_presence(policydb_t * p, const char *id, int sym_type, unsigned int scope_type, unsig… in test_sym_presence()
63 policydb_t *p = (policydb_t *) data; in common_test_index()
72 policydb_t *p = (policydb_t *) data; in class_test_index()
82 policydb_t *p = (policydb_t *) data; in role_test_index()
92 policydb_t *p = (policydb_t *) data; in type_test_index()
106 policydb_t *p = (policydb_t *) data; in user_test_index()
116 policydb_t *p = (policydb_t *) data; in cond_test_index()
126 policydb_t *p = (policydb_t *) data; in level_test_index()
135 policydb_t *p = (policydb_t *) data; in cat_test_index()
144 void test_policydb_indexes(policydb_t * p) in test_policydb_indexes()
[all …]
Dtest-deps.c85 static policydb_t bases_met[NUM_BASES];
86 static policydb_t bases_notmet[NUM_BASES];
142 policydb_t *base; in do_deps_modreq_global()
143 policydb_t mod; in do_deps_modreq_global()
144 policydb_t *mods[] = { &mod }; in do_deps_modreq_global()
225 policydb_t *base; in do_deps_modreq_opt()
226 policydb_t mod; in do_deps_modreq_opt()
227 policydb_t *mods[] = { &mod }; in do_deps_modreq_opt()
Dtest-common.h37 extern void test_sym_presence(policydb_t * p, const char *id, int sym_type, unsigned int scope_type…
43 extern void test_policydb_indexes(policydb_t * p);
53 extern void test_alias_datum(policydb_t * p, const char *id, const char *primary_id, char mode, uns…
65 extern role_datum_t *test_role_type_set(policydb_t * p, const char *id, avrule_decl_t * decl, const…
76 extern void test_attr_types(policydb_t * p, const char *id, avrule_decl_t * decl, const char **type…
Dtest-downgrade.c37 static policydb_t policydb;
129 policydb_t policydb_tmp; in do_downgrade_test()
203 int read_binary_policy(const char *path, policydb_t *p) in read_binary_policy()
238 int write_binary_policy(const char *path, policydb_t *p) in write_binary_policy()
/third_party/selinux/libsepol/include/sepol/policydb/
Dexpand.h48 extern int expand_module_avrules(sepol_handle_t * handle, policydb_t * base,
49 policydb_t * out, uint32_t * typemap, uint32_t * boolmap,
58 policydb_t * base, policydb_t * out,
62 extern int expand_convert_type_set(policydb_t * p, uint32_t * typemap,
65 extern int type_set_expand(type_set_t * set, ebitmap_t * t, policydb_t * p,
67 extern int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t * base, uint…
69 policydb_t *p, sepol_handle_t *h);
71 policydb_t *p, sepol_handle_t *h);
73 policydb_t * source_pol,
78 extern int expand_avtab(policydb_t * p, avtab_t * a, avtab_t * expa);
[all …]
Dconditional.h97 extern int cond_evaluate_expr(policydb_t * p, cond_expr_t * expr);
101 extern int cond_normalize_expr(policydb_t * p, cond_node_t * cn);
105 extern cond_node_t *cond_node_find(policydb_t * p,
109 extern cond_node_t *cond_node_create(policydb_t * p, cond_node_t * node);
111 extern cond_node_t *cond_node_search(policydb_t * p, cond_node_t * list,
114 extern int evaluate_conds(policydb_t * p);
123 extern int cond_policydb_init(policydb_t * p);
124 extern void cond_policydb_destroy(policydb_t * p);
127 extern int cond_init_bool_indexes(policydb_t * p);
133 extern int cond_read_bool(policydb_t * p, hashtab_t h, struct policy_file *fp);
[all …]
Dhierarchy.h35 extern int hierarchy_add_bounds(sepol_handle_t *handle, policydb_t *p);
38 extern int bounds_check_type(sepol_handle_t *handle, policydb_t *p, uint32_t child,
41 extern int bounds_check_users(sepol_handle_t *handle, policydb_t *p);
42 extern int bounds_check_roles(sepol_handle_t *handle, policydb_t *p);
43 extern int bounds_check_types(sepol_handle_t *handle, policydb_t *p);
45 extern int hierarchy_check_constraints(sepol_handle_t * handle, policydb_t * p);
Dpolicydb.h616 } policydb_t; typedef
622 extern int policydb_init(policydb_t * p);
625 void *data, size_t len, policydb_t * policydb);
628 policydb_t * policydb, void **newdata,
631 extern int policydb_index_classes(policydb_t * p);
633 extern int policydb_index_bools(policydb_t * p);
635 extern int policydb_index_others(sepol_handle_t * handle, policydb_t * p,
646 extern int policydb_reindex_users(policydb_t * p);
648 extern int policydb_optimize(policydb_t * p);
650 extern void policydb_destroy(policydb_t * p);
[all …]
Davrule_block.h34 extern avrule_decl_t *get_avrule_decl(policydb_t * p, uint32_t decl_id);
35 extern cond_list_t *get_decl_cond_list(policydb_t * p,
38 extern int is_id_enabled(char *id, policydb_t * p, int symbol_table);
39 extern int is_perm_enabled(char *class_id, char *perm_id, policydb_t * p);
/third_party/selinux/libsepol/src/
Dmls.h32 const policydb_t * policydb,
36 const policydb_t * policydb,
40 extern int mls_compute_context_len(const policydb_t * policydb,
44 extern void mls_sid_to_context(const policydb_t * policydb,
49 extern int mls_context_to_sid(const policydb_t * policydb,
53 extern int mls_context_isvalid(const policydb_t * p,
56 extern int mls_convert_context(policydb_t * oldp,
57 policydb_t * newp, context_struct_t * context);
59 extern int mls_compute_sid(policydb_t * policydb,
Dcontext.h12 const policydb_t * policydb,
17 const policydb_t * policydb,
23 const policydb_t * policydb,
28 extern int context_is_valid(const policydb_t * policydb,
33 const policydb_t * policydb,
Dbooleans.c15 policydb_t * policydb, in bool_update()
55 const policydb_t * policydb, in bool_to_record()
87 policydb_t *policydb = &p->p; in sepol_bool_set()
110 const policydb_t *policydb = &p->p; in sepol_bool_count()
121 const policydb_t *policydb = &p->p; in sepol_bool_exists()
144 const policydb_t *policydb = &p->p; in sepol_bool_query()
184 const policydb_t *policydb = &p->p; in sepol_bool_iterate()
Dhierarchy.c97 static int bounds_expand_rule(sepol_handle_t *handle, policydb_t *p, in bounds_expand_rule()
126 static int bounds_expand_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_cond_rules()
147 policydb_t *p;
185 static int bounds_expand_parent_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_parent_rules()
281 static int bounds_check_rule(sepol_handle_t *handle, policydb_t *p, in bounds_check_rule()
322 static int bounds_check_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_cond_rules()
350 policydb_t *p;
371 static int bounds_check_child_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_child_rules()
413 int bounds_check_type(sepol_handle_t *handle, policydb_t *p, uint32_t child, in bounds_check_type()
435 policydb_t *p;
[all …]
Dibendports.c15 const policydb_t *policydb, in ibendport_from_record()
72 const policydb_t *policydb, in ibendport_to_record()
114 const policydb_t *policydb = &p->p; in sepol_ibendport_count()
130 const policydb_t *policydb = &p->p; in sepol_ibendport_exists()
158 const policydb_t *policydb = &p->p; in sepol_ibendport_query()
193 policydb_t *policydb = &p->p; in sepol_ibendport_modify()
224 const policydb_t *policydb = &p->p; in sepol_ibendport_iterate()
Dconditional.c142 cond_node_t *cond_node_create(policydb_t * p, cond_node_t * node) in cond_node_create()
175 cond_node_t *cond_node_find(policydb_t * p, in cond_node_find()
192 cond_node_t *cond_node_search(policydb_t * p, cond_node_t * list, in cond_node_search()
211 int cond_evaluate_expr(policydb_t * p, cond_expr_t * expr) in cond_evaluate_expr()
309 static int evaluate_cond_node(policydb_t * p, cond_node_t * node) in evaluate_cond_node()
344 int cond_normalize_expr(policydb_t * p, cond_node_t * cn) in cond_normalize_expr()
440 int evaluate_conds(policydb_t * p) in evaluate_conds()
453 int cond_policydb_init(policydb_t * p) in cond_policydb_init()
512 void cond_policydb_destroy(policydb_t * p) in cond_policydb_destroy()
520 int cond_init_bool_indexes(policydb_t * p) in cond_init_bool_indexes()
[all …]
Dinterfaces.c13 const policydb_t * policydb, in iface_from_record()
67 const policydb_t * policydb, in iface_to_record()
114 const policydb_t *policydb = &p->p; in sepol_iface_exists()
138 const policydb_t *policydb = &p->p; in sepol_iface_query()
170 policydb_t *policydb = &p->p; in sepol_iface_modify()
224 const policydb_t *policydb = &p->p; in sepol_iface_count()
241 const policydb_t *policydb = &p->p; in sepol_iface_iterate()
Dibpkeys.c17 const policydb_t *policydb, in ibpkey_from_record()
69 const policydb_t *policydb, in ibpkey_to_record()
108 const policydb_t *policydb = &p->p; in sepol_ibpkey_count()
124 const policydb_t *policydb = &p->p; in sepol_ibpkey_exists()
154 const policydb_t *policydb = &p->p; in sepol_ibpkey_query()
190 policydb_t *policydb = &p->p; in sepol_ibpkey_modify()
221 const policydb_t *policydb = &p->p; in sepol_ibpkey_iterate()
Dassertion.c33 policydb_t *p;
39 static const char* policy_name(policydb_t *p) { in policy_name()
47 static void report_failure(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, in report_failure()
146 policydb_t *p, const avrule_t *avrule, in report_assertion_extended_permissions()
217 policydb_t *p = a->p; in report_assertion_avtab_matches()
294 static int report_assertion_failures(sepol_handle_t *handle, policydb_t *p, avrule_t *avrule) in report_assertion_failures()
326 avtab_key_t *k, policydb_t *p) in check_assertion_extended_permissions_avtab()
380 avtab_key_t *k, policydb_t *p) in check_assertion_extended_permissions()
445 static int check_assertion_self_match(avtab_key_t *k, avrule_t *avrule, policydb_t *p) in check_assertion_self_match()
475 policydb_t *p = a->p; in check_assertion_avtab_match()
[all …]
Dports.c56 const policydb_t * policydb, in port_from_record()
115 const policydb_t * policydb, in port_to_record()
163 const policydb_t *policydb = &p->p; in sepol_port_count()
180 const policydb_t *policydb = &p->p; in sepol_port_exists()
218 const policydb_t *policydb = &p->p; in sepol_port_query()
258 policydb_t *policydb = &p->p; in sepol_port_modify()
295 const policydb_t *policydb = &p->p; in sepol_port_iterate()
Dpolicydb_validate.c21 const policydb_t *policy;
49 static int validate_array_init(const policydb_t *p, validate_t flavors[]) in validate_array_init()
471 static int validate_simpletype(uint32_t value, const policydb_t *p, validate_t flavors[]) in validate_simpletype()
491 static int validate_type_datum(sepol_handle_t *handle, const type_datum_t *type, const policydb_t *… in validate_type_datum()
618 …_datum(sepol_handle_t *handle, const user_datum_t *user, validate_t flavors[], const policydb_t *p) in validate_user_datum()
684 static int validate_datum_array_gaps(sepol_handle_t *handle, const policydb_t *p, validate_t flavor… in validate_datum_array_gaps()
734 static int validate_datum_array_entries(sepol_handle_t *handle, const policydb_t *p, validate_t fla… in validate_datum_array_entries()
773 static int validate_avtab_key(const avtab_key_t *key, int conditional, const policydb_t *p, validat… in validate_avtab_key()
844 static int validate_avtab(sepol_handle_t *handle, const avtab_t *avtab, const policydb_t *p, valida… in validate_avtab()
856 …d_av_list(sepol_handle_t *handle, const cond_av_list_t *cond_av, const policydb_t *p, validate_t f… in validate_cond_av_list()
[all …]
/third_party/selinux/checkpolicy/test/
Ddispol.c37 static policydb_t policydb;
45 static int render_access_mask(uint32_t mask, avtab_key_t * key, policydb_t * p, in render_access_mask()
57 static int render_type(uint32_t type, policydb_t * p, FILE * fp) in render_type()
63 static int render_key(avtab_key_t * key, policydb_t * p, FILE * fp) in render_key()
88 policydb_t * p, FILE * fp) in render_av_rule()
166 static int display_avtab(avtab_t * a, uint32_t what, policydb_t * p, FILE * fp) in display_avtab()
181 static int display_bools(policydb_t * p, FILE * fp) in display_bools()
192 static void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp) in display_expr()
227 static int display_cond_expressions(policydb_t * p, FILE * fp) in display_cond_expressions()
252 static int display_handle_unknown(policydb_t * p, FILE * out_fp) in display_handle_unknown()
[all …]
Ddismod.c56 static policydb_t policydb;
73 static void render_access_mask(uint32_t mask, uint32_t class, policydb_t * p, in render_access_mask()
85 policydb_t * p, FILE * fp) in render_access_bitmap()
100 static void display_id(policydb_t * p, FILE * fp, uint32_t symbol_type, in display_id()
114 static int display_type_set(type_set_t * set, uint32_t flags, policydb_t * policy, in display_type_set()
178 static int display_mod_role_set(role_set_t * roles, policydb_t * p, FILE * fp) in display_mod_role_set()
213 static int display_avrule(avrule_t * avrule, policydb_t * policy, in display_avrule()
358 static int display_types(policydb_t * p, FILE * fp) in display_types()
365 static int display_users(policydb_t * p, FILE * fp) in display_users()
384 static int display_bools(policydb_t * p, FILE * fp) in display_bools()
[all …]

123