Home
last modified time | relevance | path

Searched refs:policydb_t (Results 1 – 25 of 67) 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.c63 policydb_t *pdb;
75 policydb_t *pdb;
81 static int __cil_get_sepol_user_datum(policydb_t *pdb, struct cil_symtab_datum *datum, user_datum_t… in __cil_get_sepol_user_datum()
92 static int __cil_get_sepol_role_datum(policydb_t *pdb, struct cil_symtab_datum *datum, role_datum_t… in __cil_get_sepol_role_datum()
103 static int __cil_get_sepol_type_datum(policydb_t *pdb, struct cil_symtab_datum *datum, type_datum_t… in __cil_get_sepol_type_datum()
114 static int __cil_get_sepol_class_datum(policydb_t *pdb, struct cil_symtab_datum *datum, class_datum… in __cil_get_sepol_class_datum()
125 static int __cil_get_sepol_cat_datum(policydb_t *pdb, struct cil_symtab_datum *datum, cat_datum_t *… in __cil_get_sepol_cat_datum()
136 static int __cil_get_sepol_level_datum(policydb_t *pdb, struct cil_symtab_datum *datum, level_datum… in __cil_get_sepol_level_datum()
241 int cil_common_to_policydb(policydb_t *pdb, struct cil_class *cil_common, common_datum_t **common_o… in cil_common_to_policydb()
289 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, char *id, int sym_type, unsigned int scope_type, unsigned in… 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, char *id, int sym_type, unsigned int scope_type, unsi…
43 extern void test_policydb_indexes(policydb_t * p);
53 extern void test_alias_datum(policydb_t * p, char *id, char *primary_id, char mode, unsigned int fl…
65 extern role_datum_t *test_role_type_set(policydb_t * p, char *id, avrule_decl_t * decl, char **type…
76 extern void test_attr_types(policydb_t * p, char *id, avrule_decl_t * decl, char **types, int len);
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()
222 policydb_t *base; in do_deps_modreq_opt()
223 policydb_t mod; in do_deps_modreq_opt()
224 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, 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.h47 extern int expand_module_avrules(sepol_handle_t * handle, policydb_t * base,
48 policydb_t * out, uint32_t * typemap, uint32_t * boolmap,
57 policydb_t * base, policydb_t * out,
61 extern int expand_convert_type_set(policydb_t * p, uint32_t * typemap,
64 extern int type_set_expand(type_set_t * set, ebitmap_t * t, policydb_t * p,
66 extern int role_set_expand(role_set_t * x, ebitmap_t * r, policydb_t * out, policydb_t * base, uint…
68 policydb_t *p, sepol_handle_t *h);
70 policydb_t *p, sepol_handle_t *h);
72 policydb_t * source_pol,
77 extern int expand_avtab(policydb_t * p, avtab_t * a, avtab_t * expa);
[all …]
Dconditional.h96 extern int cond_evaluate_expr(policydb_t * p, cond_expr_t * expr);
100 extern int cond_normalize_expr(policydb_t * p, cond_node_t * cn);
104 extern cond_node_t *cond_node_find(policydb_t * p,
108 extern cond_node_t *cond_node_create(policydb_t * p, cond_node_t * node);
110 extern cond_node_t *cond_node_search(policydb_t * p, cond_node_t * list,
113 extern int evaluate_conds(policydb_t * p);
122 extern int cond_policydb_init(policydb_t * p);
123 extern void cond_policydb_destroy(policydb_t * p);
126 extern int cond_init_bool_indexes(policydb_t * p);
132 extern int cond_read_bool(policydb_t * p, hashtab_t h, struct policy_file *fp);
[all …]
Dhierarchy.h34 extern int hierarchy_add_bounds(sepol_handle_t *handle, policydb_t *p);
37 extern int bounds_check_type(sepol_handle_t *handle, policydb_t *p, uint32_t child,
40 extern int bounds_check_users(sepol_handle_t *handle, policydb_t *p);
41 extern int bounds_check_roles(sepol_handle_t *handle, policydb_t *p);
42 extern int bounds_check_types(sepol_handle_t *handle, policydb_t *p);
44 extern int hierarchy_check_constraints(sepol_handle_t * handle, policydb_t * p);
Dpolicydb.h589 } policydb_t; typedef
595 extern int policydb_init(policydb_t * p);
598 void *data, size_t len, policydb_t * policydb);
601 policydb_t * policydb, void **newdata,
604 extern int policydb_index_classes(policydb_t * p);
606 extern int policydb_index_bools(policydb_t * p);
608 extern int policydb_index_others(sepol_handle_t * handle, policydb_t * p,
611 extern int policydb_reindex_users(policydb_t * p);
613 extern void policydb_destroy(policydb_t * p);
615 extern int policydb_load_isids(policydb_t * p, sidtab_t * s);
[all …]
Davrule_block.h33 extern avrule_decl_t *get_avrule_decl(policydb_t * p, uint32_t decl_id);
34 extern cond_list_t *get_decl_cond_list(policydb_t * p,
37 extern int is_id_enabled(char *id, policydb_t * p, int symbol_table);
38 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()
122 const policydb_t *policydb = &p->p; in sepol_bool_exists()
145 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()
140 static int bounds_expand_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_cond_rules()
161 policydb_t *p;
199 static int bounds_expand_parent_rules(sepol_handle_t *handle, policydb_t *p, in bounds_expand_parent_rules()
295 static int bounds_check_rule(sepol_handle_t *handle, policydb_t *p, in bounds_check_rule()
362 static int bounds_check_cond_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_cond_rules()
390 policydb_t *p;
411 static int bounds_check_child_rules(sepol_handle_t *handle, policydb_t *p, in bounds_check_child_rules()
453 int bounds_check_type(sepol_handle_t *handle, policydb_t *p, uint32_t child, in bounds_check_type()
475 policydb_t *p;
[all …]
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()
139 const policydb_t *policydb = &p->p; in sepol_iface_query()
171 policydb_t *policydb = &p->p; in sepol_iface_modify()
225 const policydb_t *policydb = &p->p; in sepol_iface_count()
243 const policydb_t *policydb = &p->p; in sepol_iface_iterate()
Dports.c42 const policydb_t * policydb, in port_from_record()
101 const policydb_t * policydb, in port_to_record()
149 const policydb_t *policydb = &p->p; in sepol_port_count()
167 const policydb_t *policydb = &p->p; in sepol_port_exists()
205 const policydb_t *policydb = &p->p; in sepol_port_query()
245 policydb_t *policydb = &p->p; in sepol_port_modify()
282 const policydb_t *policydb = &p->p; in sepol_port_iterate()
Dpolicydb.c687 static int roles_init(policydb_t * p) in roles_init()
727 int policydb_init(policydb_t * p) in policydb_init()
731 memset(p, 0, sizeof(policydb_t)); in policydb_init()
783 policydb_t *p; in policydb_role_cache()
787 p = (policydb_t *) arg; in policydb_role_cache()
801 policydb_t *p; in policydb_user_cache()
805 p = (policydb_t *) arg; in policydb_user_cache()
845 policydb_t *p; in common_index()
849 p = (policydb_t *) datap; in common_index()
859 policydb_t *p; in class_index()
[all …]
Dcontext.c15 int policydb_context_isvalid(const policydb_t * p, const context_struct_t * c) in policydb_context_isvalid()
34 int context_is_valid(const policydb_t * p, const context_struct_t * c) in context_is_valid()
88 const policydb_t * policydb, in context_to_string()
144 const policydb_t * policydb, in context_from_record()
243 const policydb_t * policydb, in context_to_record()
292 const policydb_t * policydb, in context_from_string()
/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()
334 int display_types(policydb_t * p, FILE * fp) in display_types()
341 int display_users(policydb_t * p, FILE * fp) in display_users()
360 int display_bools(policydb_t * p, FILE * fp) in display_bools()
[all …]
/external/selinux/policycoreutils/sepolgen-ifgen/
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