Home
last modified time | relevance | path

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

123

/external/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.c66 policydb_t *pdb;
78 policydb_t *pdb;
84 static int __cil_get_sepol_user_datum(policydb_t *pdb, struct cil_symtab_datum *datum, user_datum_t… in __cil_get_sepol_user_datum()
95 static int __cil_get_sepol_role_datum(policydb_t *pdb, struct cil_symtab_datum *datum, role_datum_t… in __cil_get_sepol_role_datum()
106 static int __cil_get_sepol_type_datum(policydb_t *pdb, struct cil_symtab_datum *datum, type_datum_t… in __cil_get_sepol_type_datum()
117 static int __cil_get_sepol_class_datum(policydb_t *pdb, struct cil_symtab_datum *datum, class_datum… in __cil_get_sepol_class_datum()
128 static int __cil_get_sepol_cat_datum(policydb_t *pdb, struct cil_symtab_datum *datum, cat_datum_t *… in __cil_get_sepol_cat_datum()
139 static int __cil_get_sepol_level_datum(policydb_t *pdb, struct cil_symtab_datum *datum, level_datum… in __cil_get_sepol_level_datum()
244 int cil_common_to_policydb(policydb_t *pdb, struct cil_class *cil_common, common_datum_t **common_o… in cil_common_to_policydb()
292 int cil_classorder_to_policydb(policydb_t *pdb, const struct cil_db *db, struct cil_class *class_va… in cil_classorder_to_policydb()
[all …]
/external/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.c29 void test_sym_presence(policydb_t * p, const char *id, int sym_type, unsigned int scope_type, unsig… in test_sym_presence()
60 policydb_t *p = (policydb_t *) data; in common_test_index()
69 policydb_t *p = (policydb_t *) data; in class_test_index()
79 policydb_t *p = (policydb_t *) data; in role_test_index()
89 policydb_t *p = (policydb_t *) data; in type_test_index()
103 policydb_t *p = (policydb_t *) data; in user_test_index()
113 policydb_t *p = (policydb_t *) data; in cond_test_index()
123 policydb_t *p = (policydb_t *) data; in level_test_index()
132 policydb_t *p = (policydb_t *) data; in cat_test_index()
141 void test_policydb_indexes(policydb_t * p) in test_policydb_indexes()
[all …]
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-deps.c83 static policydb_t bases_met[NUM_BASES];
84 static policydb_t bases_notmet[NUM_BASES];
140 policydb_t *base; in do_deps_modreq_global()
141 policydb_t mod; in do_deps_modreq_global()
142 policydb_t *mods[] = { &mod }; in do_deps_modreq_global()
223 policydb_t *base; in do_deps_modreq_opt()
224 policydb_t mod; in do_deps_modreq_opt()
225 policydb_t *mods[] = { &mod }; in do_deps_modreq_opt()
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()
240 int write_binary_policy(const char *path, policydb_t *p) in write_binary_policy()
Dtest-linker-cond-map.c57 void test_cond_expr_mapping(policydb_t * p, avrule_decl_t * d, test_cond_expr_t * bools, int len) in test_cond_expr_mapping()
78 void test_bool_state(policydb_t * p, const char *bool, int state) in test_bool_state()
87 void base_cond_tests(policydb_t * base) in base_cond_tests()
118 void module_cond_tests(policydb_t * base) in module_cond_tests()
/external/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.h607 } policydb_t; typedef
613 extern int policydb_init(policydb_t * p);
616 void *data, size_t len, policydb_t * policydb);
619 policydb_t * policydb, void **newdata,
622 extern int policydb_index_classes(policydb_t * p);
624 extern int policydb_index_bools(policydb_t * p);
626 extern int policydb_index_others(sepol_handle_t * handle, policydb_t * p,
637 extern int policydb_reindex_users(policydb_t * p);
639 extern void policydb_destroy(policydb_t * p);
641 extern int policydb_load_isids(policydb_t * p, sidtab_t * s);
[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);
/external/selinux/libsepol/src/
Dmls.h31 const policydb_t * policydb,
35 const policydb_t * policydb,
39 extern int mls_compute_context_len(const policydb_t * policydb,
43 extern void mls_sid_to_context(const policydb_t * policydb,
48 extern int mls_context_to_sid(const policydb_t * policydb,
52 extern int mls_context_isvalid(const policydb_t * p,
55 extern int mls_convert_context(policydb_t * oldp,
56 policydb_t * newp, context_struct_t * context);
58 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()
90 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()
128 static int bounds_expand_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_cond_rules()
149 policydb_t *p;
187 static int bounds_expand_parent_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_parent_rules()
283 static int bounds_check_rule(sepol_handle_t *handle, policydb_t *p, in bounds_check_rule()
326 static int bounds_check_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_cond_rules()
354 policydb_t *p;
375 static int bounds_check_child_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_child_rules()
417 int bounds_check_type(sepol_handle_t *handle, policydb_t *p, uint32_t child, in bounds_check_type()
439 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.c141 cond_node_t *cond_node_create(policydb_t * p, cond_node_t * node) in cond_node_create()
174 cond_node_t *cond_node_find(policydb_t * p, in cond_node_find()
191 cond_node_t *cond_node_search(policydb_t * p, cond_node_t * list, in cond_node_search()
210 int cond_evaluate_expr(policydb_t * p, cond_expr_t * expr) in cond_evaluate_expr()
308 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()
443 int evaluate_conds(policydb_t * p) in evaluate_conds()
456 int cond_policydb_init(policydb_t * p) in cond_policydb_init()
515 void cond_policydb_destroy(policydb_t * p) in cond_policydb_destroy()
523 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.c16 const policydb_t *policydb, in ibpkey_from_record()
68 const policydb_t *policydb, in ibpkey_to_record()
107 const policydb_t *policydb = &p->p; in sepol_ibpkey_count()
123 const policydb_t *policydb = &p->p; in sepol_ibpkey_exists()
153 const policydb_t *policydb = &p->p; in sepol_ibpkey_query()
189 policydb_t *policydb = &p->p; in sepol_ibpkey_modify()
220 const policydb_t *policydb = &p->p; in sepol_ibpkey_iterate()
Dports.c49 const policydb_t * policydb, in port_from_record()
108 const policydb_t * policydb, in port_to_record()
156 const policydb_t *policydb = &p->p; in sepol_port_count()
173 const policydb_t *policydb = &p->p; in sepol_port_exists()
211 const policydb_t *policydb = &p->p; in sepol_port_query()
251 policydb_t *policydb = &p->p; in sepol_port_modify()
288 const policydb_t *policydb = &p->p; in sepol_port_iterate()
/external/selinux/checkpolicy/test/
Ddispol.c37 static policydb_t policydb;
45 int render_access_mask(uint32_t mask, avtab_key_t * key, policydb_t * p, in render_access_mask()
57 int render_type(uint32_t type, policydb_t * p, FILE * fp) in render_type()
63 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 int display_avtab(avtab_t * a, uint32_t what, policydb_t * p, FILE * fp) in display_avtab()
181 int display_bools(policydb_t * p, FILE * fp) in display_bools()
192 void display_expr(policydb_t * p, cond_expr_t * exp, FILE * fp) in display_expr()
227 int display_cond_expressions(policydb_t * p, FILE * fp) in display_cond_expressions()
252 int display_handle_unknown(policydb_t * p, FILE * out_fp) in display_handle_unknown()
[all …]
Ddismod.c57 static policydb_t policydb;
74 static void render_access_mask(uint32_t mask, uint32_t class, policydb_t * p, in render_access_mask()
86 policydb_t * p, FILE * fp) in render_access_bitmap()
101 static void display_id(policydb_t * p, FILE * fp, uint32_t symbol_type, in display_id()
115 int display_type_set(type_set_t * set, uint32_t flags, policydb_t * policy, in display_type_set()
179 int display_mod_role_set(role_set_t * roles, policydb_t * p, FILE * fp) in display_mod_role_set()
214 int display_avrule(avrule_t * avrule, policydb_t * policy, in display_avrule()
359 int display_types(policydb_t * p, FILE * fp) in display_types()
366 int display_users(policydb_t * p, FILE * fp) in display_users()
385 int display_bools(policydb_t * p, FILE * fp) in display_bools()
[all …]
/external/selinux/python/audit2allow/
Dsepolgen-ifgen-attr-helper.c56 int render_access_mask(uint32_t av, avtab_key_t *key, policydb_t *policydbp, in render_access_mask()
88 static int render_key(avtab_key_t *key, policydb_t *p, FILE *fp) in render_key()
107 policydb_t *policy;
145 static policydb_t *load_policy(const char *filename) in load_policy()
147 policydb_t *policydb; in load_policy()
163 policydb = malloc(sizeof(policydb_t)); in load_policy()
196 policydb_t *p; in main()

123