Home
last modified time | relevance | path

Searched refs:permx (Results 1 – 12 of 12) sorted by relevance

/external/selinux/libsepol/cil/src/
Dcil_post.c1004 static int __evaluate_permissionx_expression(struct cil_permissionx *permx, struct cil_db *db) in __evaluate_permissionx_expression() argument
1008 permx->perms = cil_malloc(sizeof(*permx->perms)); in __evaluate_permissionx_expression()
1009 ebitmap_init(permx->perms); in __evaluate_permissionx_expression()
1011 …rc = __cil_expr_to_bitmap(permx->expr_str, permx->perms, 0x10000, db); // max is one more than 0xF… in __evaluate_permissionx_expression()
1014 ebitmap_destroy(permx->perms); in __evaluate_permissionx_expression()
1015 free(permx->perms); in __evaluate_permissionx_expression()
1016 permx->perms = NULL; in __evaluate_permissionx_expression()
1565 rc = __evaluate_permissionx_expression(rule->perms.x.permx, db); in __cil_post_db_attr_helper()
1571 struct cil_permissionx *permx = node->data; in __cil_post_db_attr_helper() local
1572 rc = __evaluate_permissionx_expression(permx, db); in __cil_post_db_attr_helper()
Dcil_write_ast.c377 static int cil_unfill_permx(struct cil_permissionx *permx, char **out_str) { in cil_unfill_permx() argument
383 switch (permx->kind) { in cil_unfill_permx()
388 cil_log(CIL_ERR, "Unknown permissionx kind: %d\n", permx->kind); in cil_unfill_permx()
393 obj = permx->obj_str; in cil_unfill_permx()
394 rc = cil_unfill_expr(permx->expr_str, &expr, 1); in cil_unfill_permx()
778 rc = cil_unfill_permx(avrule->perms.x.permx, &xperms); in cil_write_avrule_x()
Dcil_find.c339 if (cil_permissionx_match_any(avrule->perms.x.permx, target->perms.x.permx)) { in cil_find_matching_avrule()
Dcil.c2368 void cil_permissionx_init(struct cil_permissionx **permx) in cil_permissionx_init() argument
2370 *permx = cil_malloc(sizeof(**permx)); in cil_permissionx_init()
2372 cil_symtab_datum_init(&(*permx)->datum); in cil_permissionx_init()
2373 (*permx)->kind = CIL_NONE; in cil_permissionx_init()
2374 (*permx)->obj_str = NULL; in cil_permissionx_init()
2375 (*permx)->obj = NULL; in cil_permissionx_init()
2376 (*permx)->expr_str = NULL; in cil_permissionx_init()
2377 (*permx)->perms = NULL; in cil_permissionx_init()
Dcil_verify.c1272 int __cil_verify_permissionx(struct cil_permissionx *permx, struct cil_tree_node *node) in __cil_verify_permissionx() argument
1281 switch (permx->kind) { in __cil_verify_permissionx()
1286 cil_tree_log(node, CIL_ERR, "Invalid permissionx kind (%d)", permx->kind); in __cil_verify_permissionx()
1291 classes = cil_expand_class(permx->obj); in __cil_verify_permissionx()
1322 return __cil_verify_permissionx(avrulex->perms.x.permx, node); in __cil_verify_avrulex()
Dcil_build_ast.c2078 if (rule->perms.x.permx_str == NULL && rule->perms.x.permx != NULL) { in cil_destroy_avrule()
2079 cil_destroy_permissionx(rule->perms.x.permx); in cil_destroy_avrule()
2086 int cil_fill_permissionx(struct cil_tree_node *parse_current, struct cil_permissionx *permx) in cil_fill_permissionx() argument
2103 permx->kind = CIL_PERMX_KIND_IOCTL; in cil_fill_permissionx()
2110 permx->obj_str = parse_current->next->data; in cil_fill_permissionx()
2112 rc = cil_gen_expr(parse_current->next->next, CIL_PERMISSIONX, &permx->expr_str); in cil_fill_permissionx()
2134 struct cil_permissionx *permx = NULL; in cil_gen_permissionx() local
2146 cil_permissionx_init(&permx); in cil_gen_permissionx()
2150 …rc = cil_gen_node(db, ast_node, (struct cil_symtab_datum*)permx, (hashtab_key_t)key, CIL_SYM_PERMX… in cil_gen_permissionx()
2155 rc = cil_fill_permissionx(parse_current->next->next->cl_head, permx); in cil_gen_permissionx()
[all …]
Dcil_binary.c1752 …_symtab_datum *src, struct cil_symtab_datum *tgt, struct cil_permissionx *permx, struct cil_args_b… in __cil_avrulex_to_hashtable_helper() argument
1767 class_list = cil_expand_class(permx->obj); in __cil_avrulex_to_hashtable_helper()
1773 switch (permx->kind) { in __cil_avrulex_to_hashtable_helper()
1775 …rulex_ioctl_table, kind, sepol_src->s.value, sepol_tgt->s.value, sepol_obj->s.value, permx->perms); in __cil_avrulex_to_hashtable_helper()
1818 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, src, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable()
1829 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable()
1850 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable()
1869 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable()
1885 rc = __cil_avrulex_to_hashtable_helper(pdb, kind, src, tgt, cil_avrulex->perms.x.permx, args); in cil_avrulex_to_hashtable()
4315 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 …]
Dcil_internal.h612 struct cil_permissionx *permx; member
1027 void cil_permissionx_init(struct cil_permissionx **permx);
Dcil_policy.c1105 static void cil_xperms_to_policy(FILE *out, struct cil_permissionx *permx) in cil_xperms_to_policy() argument
1112 if (permx->kind == CIL_PERMX_KIND_IOCTL) { in cil_xperms_to_policy()
1118 fprintf(out, "%s %s {", DATUM(permx->obj)->fqn, kind); in cil_xperms_to_policy()
1120 ebitmap_for_each_positive_bit(permx->perms, node, i) { in cil_xperms_to_policy()
1181 cil_xperms_to_policy(out, rule->perms.x.permx); in cil_av_rulex_to_policy()
Dcil_build_ast.h116 void cil_destroy_permissionx(struct cil_permissionx *permx);
Dcil_copy_ast.c833 cil_permissionx_init(&new->perms.x.permx); in cil_copy_avrule()
834 cil_copy_fill_permissionx(db, orig->perms.x.permx, new->perms.x.permx); in cil_copy_avrule()
Dcil_resolve_ast.c285 int cil_resolve_permissionx(struct cil_tree_node *current, struct cil_permissionx *permx, void *ext… in cil_resolve_permissionx() argument
290 rc = cil_resolve_name(current, permx->obj_str, CIL_SYM_CLASSES, extra_args, &obj_datum); in cil_resolve_permissionx()
294 permx->obj = (struct cil_class*)obj_datum; in cil_resolve_permissionx()
349 rule->perms.x.permx = (struct cil_permissionx*)permx_datum; in cil_resolve_avrule()
351 rc = cil_resolve_permissionx(current, rule->perms.x.permx, extra_args); in cil_resolve_avrule()