Home
last modified time | relevance | path

Searched refs:cil_symtab_datum (Results 1 – 20 of 20) sorted by relevance

/third_party/selinux/libsepol/cil/src/
Dcil_symtab.h38 struct cil_symtab_datum { struct
45 #define DATUM(d) ((struct cil_symtab_datum *)(d)) argument
74 void cil_symtab_datum_init(struct cil_symtab_datum *datum);
75 void cil_symtab_datum_destroy(struct cil_symtab_datum *datum);
76 void cil_symtab_datum_remove_node(struct cil_symtab_datum *datum, struct cil_tree_node *node);
77 int cil_symtab_insert(symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struct c…
78 void cil_symtab_remove_datum(struct cil_symtab_datum *datum);
79 int cil_symtab_get_datum(symtab_t *symtab, char *key, struct cil_symtab_datum **datum);
Dcil_internal.h346 struct cil_symtab_datum datum;
368 struct cil_symtab_datum datum;
372 struct cil_symtab_datum datum;
378 struct cil_symtab_datum datum;
402 struct cil_symtab_datum datum;
423 struct cil_symtab_datum datum;
433 struct cil_symtab_datum datum;
449 struct cil_symtab_datum datum;
458 struct cil_symtab_datum datum;
503 struct cil_symtab_datum datum;
[all …]
Dcil_resolve_ast.c81 struct cil_symtab_datum *datum = NULL; in __cil_insert_name()
108 cil_symtab_insert(symtab, key, (struct cil_symtab_datum *)name, ast_node); in __cil_insert_name()
131 struct cil_symtab_datum *perm_datum = NULL; in __cil_resolve_perms()
162 struct cil_symtab_datum *datum = NULL; in cil_resolve_classperms()
197 struct cil_symtab_datum *datum = NULL; in cil_resolve_classperms_set()
249 struct cil_symtab_datum *datum; in cil_resolve_classpermissionset()
278 static void cil_type_used(struct cil_symtab_datum *datum, int used) in cil_type_used()
297 struct cil_symtab_datum *obj_datum = NULL; in cil_resolve_permissionx()
318 struct cil_symtab_datum *src_datum = NULL; in cil_resolve_avrule()
319 struct cil_symtab_datum *tgt_datum = NULL; in cil_resolve_avrule()
[all …]
Dcil_find.c46 static int cil_type_match_any(struct cil_symtab_datum *d1, struct cil_symtab_datum *d2) in cil_type_match_any()
82 …tatic int cil_type_matches(ebitmap_t *matches, struct cil_symtab_datum *d1, struct cil_symtab_datu… in cil_type_matches()
119 static int cil_self_match_any(struct cil_symtab_datum *s1, struct cil_symtab_datum *s2, struct cil_… in cil_self_match_any()
298 struct cil_symtab_datum *s1 = avrule->src; in cil_find_matching_avrule()
299 struct cil_symtab_datum *t1 = avrule->tgt; in cil_find_matching_avrule()
300 struct cil_symtab_datum *s2 = target->src; in cil_find_matching_avrule()
301 struct cil_symtab_datum *t2 = target->tgt; in cil_find_matching_avrule()
Dcil_symtab.c62 void cil_symtab_datum_init(struct cil_symtab_datum *datum) in cil_symtab_datum_init()
70 void cil_symtab_datum_destroy(struct cil_symtab_datum *datum) in cil_symtab_datum_destroy()
76 void cil_symtab_datum_remove_node(struct cil_symtab_datum *datum, struct cil_tree_node *node) in cil_symtab_datum_remove_node()
88 int cil_symtab_insert(symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struct c… in cil_symtab_insert()
106 void cil_symtab_remove_datum(struct cil_symtab_datum *datum) in cil_symtab_remove_datum()
119 int cil_symtab_get_datum(symtab_t *symtab, char *key, struct cil_symtab_datum **datum) in cil_symtab_get_datum()
121 *datum = (struct cil_symtab_datum*)hashtab_search(symtab->table, (hashtab_key_t)key); in cil_symtab_get_datum()
138 struct cil_symtab_datum *datum = d; in __cil_symtab_destroy_helper()
Dcil_fqn.c49 struct cil_symtab_datum *datum = (struct cil_symtab_datum *)d; in __cil_fqn_qualify_decls()
77 struct cil_symtab_datum *datum = (struct cil_symtab_datum *)block; in __cil_fqn_qualify_blocks()
Dcil_copy_ast.c104 struct cil_symtab_datum *datum = NULL; in cil_copy_block()
158 struct cil_symtab_datum *datum = NULL; in cil_copy_policycap()
176 struct cil_symtab_datum *datum = NULL; in cil_copy_perm()
247 struct cil_symtab_datum *datum = NULL; in cil_copy_class()
284 struct cil_symtab_datum *datum = NULL; in cil_copy_classpermission()
338 struct cil_symtab_datum *datum = NULL; in cil_copy_sid()
390 struct cil_symtab_datum *datum = NULL; in cil_copy_user()
409 struct cil_symtab_datum *datum = NULL; in cil_copy_userattribute()
514 struct cil_symtab_datum *datum = NULL; in cil_copy_role()
547 struct cil_symtab_datum *datum = NULL; in cil_copy_roleattribute()
[all …]
Dcil_resolve_ast.h94 …(struct cil_call *call, char *name, enum cil_sym_index sym_index, struct cil_symtab_datum **datum);
101 …node, char *name, enum cil_sym_index sym_index, void *extra_args, struct cil_symtab_datum **datum);
102 …node, char *name, enum cil_sym_index sym_index, void *extra_args, struct cil_symtab_datum **datum);
Dcil_post.c154 struct cil_symtab_datum *d = curr->data; in cil_verify_is_list()
889 static int __cil_type_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, struct cil_db *d… in __cil_type_to_bitmap()
941 static int __cil_user_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, struct cil_db *d… in __cil_user_to_bitmap()
989 static int __cil_role_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, struct cil_db *d… in __cil_role_to_bitmap()
1058 static int __cil_permx_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, __attribute__((… in __cil_permx_to_bitmap()
1081 static int __cil_perm_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, __attribute__((u… in __cil_perm_to_bitmap()
1140 static int __cil_cat_to_bitmap(struct cil_symtab_datum *datum, ebitmap_t *bitmap, struct cil_db *db) in __cil_cat_to_bitmap()
1188 struct cil_symtab_datum *d1 = i1->data; in __cil_cat_expr_range_to_bitmap_helper()
1189 struct cil_symtab_datum *d2 = i2->data; in __cil_cat_expr_range_to_bitmap_helper()
1602 static int __cil_role_assign_types(struct cil_role *role, struct cil_symtab_datum *datum) in __cil_role_assign_types()
[all …]
Dcil_binary.c79 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()
145 static int __cil_expand_user(struct cil_symtab_datum *datum, ebitmap_t *new) in __cil_expand_user()
173 static int __cil_expand_role(struct cil_symtab_datum *datum, ebitmap_t *new) in __cil_expand_role()
199 static int __cil_expand_type(struct cil_symtab_datum *datum, ebitmap_t *new) in __cil_expand_type()
1096 struct cil_symtab_datum *src = NULL; in __cil_type_rule_to_avtab()
[all …]
Dcil_build_ast.c109 …mtab(struct cil_db *db, symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struc… in cil_add_decl_to_symtab()
119 struct cil_symtab_datum *prev; in cil_add_decl_to_symtab()
143 int cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_symtab_datum *datum,… in cil_gen_node()
222 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)block, (hashtab_key_t)key, CIL_SYM_BLOCK… in cil_gen_block()
472 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)class, (hashtab_key_t)key, CIL_SYM_CLASS… in cil_gen_class()
595 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)perm, (hashtab_key_t)key, CIL_SYM_PERMS,… in cil_gen_perm()
834 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)cp, (hashtab_key_t)key, CIL_SYM_CLASSPER… in cil_gen_classpermission()
941 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)map, (hashtab_key_t)key, CIL_SYM_CLASSES… in cil_gen_map_class()
1041 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)common, (hashtab_key_t)key, CIL_SYM_COMM… in cil_gen_common()
1139 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)sid, (hashtab_key_t)key, CIL_SYM_SIDS, C… in cil_gen_sid()
[all …]
Dcil_verify.c418 static int cil_verify_no_self_reference(enum cil_flavor flavor, struct cil_symtab_datum *datum, str…
431 struct cil_symtab_datum* datum = item->data; in __verify_no_self_reference_in_expr()
444 static int cil_verify_no_self_reference(enum cil_flavor flavor, struct cil_symtab_datum *datum, str… in cil_verify_no_self_reference()
451 struct cil_symtab_datum *prev = item->data; in cil_verify_no_self_reference()
1425 struct cil_symtab_datum *perm_datum; in __cil_verify_permissionx()
1704 struct cil_symtab_datum *orig, in __cil_verify_classperms()
1705 struct cil_symtab_datum *parent, in __cil_verify_classperms()
1706 struct cil_symtab_datum *cur, in __cil_verify_classperms()
Dcil_build_ast.h40 …mtab(struct cil_db *db, symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struc…
42 int cil_gen_node(struct cil_db *db, struct cil_tree_node *ast_node, struct cil_symtab_datum *datum,…
Dcil_tree.c232 struct cil_symtab_datum *datum; in cil_tree_node_destroy()
Dcil_policy.c1158 struct cil_symtab_datum *src, *tgt; in cil_av_rulex_to_policy()
1189 struct cil_symtab_datum *src, *tgt; in cil_av_rule_to_policy()
1227 struct cil_symtab_datum *src, *tgt, *res; in cil_type_rule_to_policy()
1259 struct cil_symtab_datum *src, *tgt, *res; in cil_nametypetransition_to_policy()
1278 struct cil_symtab_datum *src, *exec; in cil_rangetransition_to_policy()
Dcil_write_ast.c44 static inline const char *datum_or_str(struct cil_symtab_datum *datum, const char *str) in datum_or_str()
49 static inline const char *datum_to_str(struct cil_symtab_datum *datum) in datum_to_str()
/third_party/selinux/libsepol/cil/test/unit/
Dtest_cil_symtab.c59 …int rc = cil_symtab_insert(test_symtab, (hashtab_key_t)test_name, (struct cil_symtab_datum*)test_b… in test_cil_symtab_insert()
Dtest_cil_build_ast.c793 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_perm_nodes()
823 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_perm_nodes_failgen_neg()
851 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_perm_nodes_inval_perm_neg()
8937 CuAssertPtrEquals(tc, test_ast_node, ((struct cil_symtab_datum*)test_ast_node->data)->node); in test_cil_gen_user()
8938 …CuAssertStrEquals(tc, test_tree->root->cl_head->cl_head->next->data, ((struct cil_symtab_datum*)te… in test_cil_gen_user()
10597 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_classcommon()
10687 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_classcommon_noperms_neg()
10715 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_gen_classcommon_extraperms_neg()
Dtest_cil_copy_ast.c285 …&test_db->symtab[CIL_SYM_CLASSES], (hashtab_key_t)test_key, (struct cil_symtab_datum*)test_cls, te… in test_cil_copy_classcommon()
Dtest_cil_resolve_ast.c11072 ((struct cil_symtab_datum *)test_db->ast->root->cl_head->data)->state = CIL_STATE_DISABLED; in test_cil_resolve_ast_node_helper_optional()