/third_party/selinux/libsepol/cil/src/ |
D | cil_write_ast.c | 300 static void write_permx(FILE *out, struct cil_permissionx *permx) in write_permx() argument 302 if (permx->datum.name) { in write_permx() 303 fprintf(out, "%s", datum_to_str(DATUM(permx))); in write_permx() 306 fprintf(out, "%s ", permx->kind == CIL_PERMX_KIND_IOCTL ? "ioctl" : "<?KIND>"); in write_permx() 307 fprintf(out, "%s ", datum_or_str(DATUM(permx->obj), permx->obj_str)); in write_permx() 308 write_expr(out, permx->expr_str); in write_permx() 813 struct cil_permissionx *permx = node->data; in cil_write_ast_node() local 814 fprintf(out, "(permissionx %s (", datum_to_str(DATUM(permx))); in cil_write_ast_node() 815 fprintf(out, "%s ", permx->kind == CIL_PERMX_KIND_IOCTL ? "ioctl" : "<?KIND>"); in cil_write_ast_node() 816 fprintf(out, "%s ", datum_or_str(DATUM(permx->obj), permx->obj_str)); in cil_write_ast_node() [all …]
|
D | cil_post.c | 1018 static int __evaluate_permissionx_expression(struct cil_permissionx *permx, struct cil_db *db) in __evaluate_permissionx_expression() argument 1022 permx->perms = cil_malloc(sizeof(*permx->perms)); in __evaluate_permissionx_expression() 1023 ebitmap_init(permx->perms); in __evaluate_permissionx_expression() 1025 …rc = __cil_expr_to_bitmap(permx->expr_str, permx->perms, 0x10000, db); // max is one more than 0xF… in __evaluate_permissionx_expression() 1028 ebitmap_destroy(permx->perms); in __evaluate_permissionx_expression() 1029 free(permx->perms); in __evaluate_permissionx_expression() 1030 permx->perms = NULL; in __evaluate_permissionx_expression() 1583 rc = __evaluate_permissionx_expression(rule->perms.x.permx, db); in __cil_post_db_attr_helper() 1589 struct cil_permissionx *permx = node->data; in __cil_post_db_attr_helper() local 1590 rc = __evaluate_permissionx_expression(permx, db); in __cil_post_db_attr_helper()
|
D | cil_find.c | 340 if (cil_permissionx_match_any(avrule->perms.x.permx, target->perms.x.permx)) { in cil_find_matching_avrule()
|
D | cil.c | 2452 void cil_permissionx_init(struct cil_permissionx **permx) in cil_permissionx_init() argument 2454 *permx = cil_malloc(sizeof(**permx)); in cil_permissionx_init() 2456 cil_symtab_datum_init(&(*permx)->datum); in cil_permissionx_init() 2457 (*permx)->kind = CIL_NONE; in cil_permissionx_init() 2458 (*permx)->obj_str = NULL; in cil_permissionx_init() 2459 (*permx)->obj = NULL; in cil_permissionx_init() 2460 (*permx)->expr_str = NULL; in cil_permissionx_init() 2461 (*permx)->perms = NULL; in cil_permissionx_init()
|
D | cil_build_ast.c | 2136 if (rule->perms.x.permx_str == NULL && rule->perms.x.permx != NULL) { in cil_destroy_avrule() 2137 cil_destroy_permissionx(rule->perms.x.permx); in cil_destroy_avrule() 2144 int cil_fill_permissionx(struct cil_tree_node *parse_current, struct cil_permissionx *permx) in cil_fill_permissionx() argument 2161 permx->kind = CIL_PERMX_KIND_IOCTL; in cil_fill_permissionx() 2168 permx->obj_str = parse_current->next->data; in cil_fill_permissionx() 2170 rc = cil_gen_expr(parse_current->next->next, CIL_PERMISSIONX, &permx->expr_str); in cil_fill_permissionx() 2192 struct cil_permissionx *permx = NULL; in cil_gen_permissionx() local 2204 cil_permissionx_init(&permx); in cil_gen_permissionx() 2208 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)permx, (hashtab_key_t)key, CIL_SYM_PERMX… in cil_gen_permissionx() 2213 rc = cil_fill_permissionx(parse_current->next->next->cl_head, permx); in cil_gen_permissionx() [all …]
|
D | cil_verify.c | 1417 int __cil_verify_permissionx(struct cil_permissionx *permx, struct cil_tree_node *node) in __cil_verify_permissionx() argument 1426 switch (permx->kind) { in __cil_verify_permissionx() 1431 cil_tree_log(node, CIL_ERR, "Invalid permissionx kind (%d)", permx->kind); in __cil_verify_permissionx() 1436 classes = cil_expand_class(permx->obj); in __cil_verify_permissionx() 1467 return __cil_verify_permissionx(avrulex->perms.x.permx, node); in __cil_verify_avrulex()
|
D | cil_binary.c | 1728 …_symtab_datum *src, struct cil_symtab_datum *tgt, struct cil_permissionx *permx, struct cil_args_b… in __cil_avrulex_to_hashtable_helper() argument 1743 class_list = cil_expand_class(permx->obj); in __cil_avrulex_to_hashtable_helper() 1749 switch (permx->kind) { in __cil_avrulex_to_hashtable_helper() 1751 …rulex_ioctl_table, kind, sepol_src->s.value, sepol_tgt->s.value, sepol_obj->s.value, permx->perms); in __cil_avrulex_to_hashtable_helper() 1794 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, src, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable() 1805 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable() 1826 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable() 1845 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable() 1861 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable() 4398 static int __cil_permx_to_sepol_class_perms(policydb_t *pdb, struct cil_permissionx *permx, class_p… in __cil_permx_to_sepol_class_perms() argument [all …]
|
D | cil_internal.h | 620 struct cil_permissionx *permx; member 1038 void cil_permissionx_init(struct cil_permissionx **permx);
|
D | cil_policy.c | 1106 static void cil_xperms_to_policy(FILE *out, struct cil_permissionx *permx) in cil_xperms_to_policy() argument 1113 if (permx->kind == CIL_PERMX_KIND_IOCTL) { in cil_xperms_to_policy() 1119 fprintf(out, "%s %s {", DATUM(permx->obj)->fqn, kind); in cil_xperms_to_policy() 1121 ebitmap_for_each_positive_bit(permx->perms, node, i) { in cil_xperms_to_policy() 1182 cil_xperms_to_policy(out, rule->perms.x.permx); in cil_av_rulex_to_policy()
|
D | cil_build_ast.h | 118 void cil_destroy_permissionx(struct cil_permissionx *permx);
|
D | cil_copy_ast.c | 825 cil_permissionx_init(&new->perms.x.permx); in cil_copy_avrule() 826 cil_copy_fill_permissionx(db, orig->perms.x.permx, new->perms.x.permx); in cil_copy_avrule()
|
D | cil_resolve_ast.c | 294 int cil_resolve_permissionx(struct cil_tree_node *current, struct cil_permissionx *permx, void *ext… in cil_resolve_permissionx() argument 299 rc = cil_resolve_name(current, permx->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_permissionx() 303 permx->obj = (struct cil_class*)obj_datum; in cil_resolve_permissionx() 358 rule->perms.x.permx = (struct cil_permissionx*)permx_datum; in cil_resolve_avrule() 360 rc = cil_resolve_permissionx(current, rule->perms.x.permx, extra_args); in cil_resolve_avrule()
|