/external/selinux/libsepol/src/ |
D | assertion.c | 34 avrule_t *avrule; member 39 static void report_failure(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, in report_failure() argument 43 if (avrule->source_filename) { in report_failure() 45 avrule->source_line, avrule->source_filename, avrule->line, in report_failure() 50 } else if (avrule->line) { in report_failure() 52 avrule->line, p->p_type_val_to_name[stype], in report_failure() 141 policydb_t *p, const avrule_t *avrule, in report_assertion_extended_permissions() argument 176 rc = check_extended_permissions(avrule->xperms, xperms); in report_assertion_extended_permissions() 179 extended_permissions_violated(&error, avrule->xperms, xperms); in report_assertion_extended_permissions() 182 avrule->source_line, avrule->source_filename, avrule->line, in report_assertion_extended_permissions() [all …]
|
D | write.c | 1647 static int avrule_write(policydb_t *p, avrule_t * avrule, in avrule_write() argument 1655 buf[items++] = cpu_to_le32(avrule->specified); in avrule_write() 1656 buf[items++] = cpu_to_le32(avrule->flags); in avrule_write() 1661 if (type_set_write(&avrule->stypes, fp)) in avrule_write() 1664 if (type_set_write(&avrule->ttypes, fp)) in avrule_write() 1667 cur = avrule->perms; in avrule_write() 1678 cur = avrule->perms; in avrule_write() 1690 if (avrule->specified & AVRULE_XPERMS) { in avrule_write() 1691 size_t nel = ARRAY_SIZE(avrule->xperms->perms); in avrule_write() 1712 buf8 = avrule->xperms->specified; in avrule_write() [all …]
|
D | module_to_cil.c | 1193 static int avrule_list_to_cil(int indent, struct policydb *pdb, struct avrule *avrule_list, struct … in avrule_list_to_cil() 1196 struct avrule *avrule; in avrule_list_to_cil() local 1202 for (avrule = avrule_list; avrule != NULL; avrule = avrule->next) { in avrule_list_to_cil() 1203 if ((avrule->specified & (AVRULE_NEVERALLOW|AVRULE_XPERMS_NEVERALLOW)) && in avrule_list_to_cil() 1204 avrule->source_filename) { in avrule_list_to_cil() 1205 cil_println(0, ";;* lmx %lu %s\n",avrule->source_line, avrule->source_filename); in avrule_list_to_cil() 1208 ts = &avrule->stypes; in avrule_list_to_cil() 1214 ts = &avrule->ttypes; in avrule_list_to_cil() 1222 if (avrule->specified & AVRULE_XPERMS) { in avrule_list_to_cil() 1223 …rc = avrulex_to_cil(indent, pdb, avrule->specified, snames[s], tnames[t], avrule->perms, avrule->x… in avrule_list_to_cil() [all …]
|
D | expand.c | 2653 avrule_t *avrule; in copy_neverallow() local 2667 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in copy_neverallow() 2668 if (!avrule) in copy_neverallow() 2671 avrule_init(avrule); in copy_neverallow() 2672 avrule->specified = source_rule->specified; in copy_neverallow() 2673 avrule->line = source_rule->line; in copy_neverallow() 2674 avrule->flags = source_rule->flags; in copy_neverallow() 2675 avrule->source_line = source_rule->source_line; in copy_neverallow() 2677 avrule->source_filename = strdup(source_rule->source_filename); in copy_neverallow() 2678 if (!avrule->source_filename) in copy_neverallow() [all …]
|
D | policydb.c | 3303 avrule_t *avrule; in avrule_read() local 3306 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in avrule_read() 3307 if (!avrule) in avrule_read() 3310 avrule_init(avrule); in avrule_read() 3316 avrule->specified = le32_to_cpu(buf[0]); in avrule_read() 3317 avrule->flags = le32_to_cpu(buf[1]); in avrule_read() 3319 if (type_set_read(&avrule->stypes, fp)) in avrule_read() 3322 if (type_set_read(&avrule->ttypes, fp)) in avrule_read() 3346 avrule->perms = cur; in avrule_read() 3353 if (avrule->specified & AVRULE_XPERMS) { in avrule_read() [all …]
|
/external/selinux/checkpolicy/test/ |
D | dismod.c | 214 int display_avrule(avrule_t * avrule, policydb_t * policy, in display_avrule() argument 220 if (avrule == NULL) { in display_avrule() 224 if (avrule->specified & AVRULE_AV) { in display_avrule() 225 if (avrule->specified & AVRULE_ALLOWED) { in display_avrule() 228 if (avrule->specified & AVRULE_AUDITALLOW) { in display_avrule() 231 if (avrule->specified & AVRULE_DONTAUDIT) { in display_avrule() 234 } else if (avrule->specified & AVRULE_TYPE) { in display_avrule() 235 if (avrule->specified & AVRULE_TRANSITION) { in display_avrule() 238 if (avrule->specified & AVRULE_MEMBER) { in display_avrule() 241 if (avrule->specified & AVRULE_CHANGE) { in display_avrule() [all …]
|
/external/selinux/python/sepolgen/src/sepolgen/ |
D | access.py | 167 def avrule_to_access_vectors(avrule): argument 178 if isinstance(avrule, AccessVector): 179 return [avrule] 181 for src_type in avrule.src_types: 182 for tgt_type in avrule.tgt_types: 183 for obj_class in avrule.obj_classes: 188 access.perms = avrule.perms.copy()
|
D | policygen.py | 404 for avrule in node.avrules(): 405 r.types.update(avrule.src_types) 406 r.types.update(avrule.tgt_types) 407 for obj in avrule.obj_classes: 408 r.add_obj_class(obj, avrule.perms)
|
D | interfaces.py | 259 for avrule in interface.avrules(): 260 if avrule.rule_type != refpolicy.AVRule.ALLOW: 266 avs = access.avrule_to_access_vectors(avrule)
|
/external/selinux/checkpolicy/ |
D | policy_define.c | 1623 avrule_t *avrule; in define_compute_type_helper() local 1628 avrule = malloc(sizeof(avrule_t)); in define_compute_type_helper() 1629 if (!avrule) { in define_compute_type_helper() 1633 avrule_init(avrule); in define_compute_type_helper() 1634 avrule->specified = which; in define_compute_type_helper() 1635 avrule->line = policydb_lineno; in define_compute_type_helper() 1636 avrule->source_line = source_lineno; in define_compute_type_helper() 1637 avrule->source_filename = strdup(source_file); in define_compute_type_helper() 1638 if (!avrule->source_filename) { in define_compute_type_helper() 1644 if (set_types(&avrule->stypes, id, &add, 0)) in define_compute_type_helper() [all …]
|
D | module_compiler.c | 25 avrule_block_t *avrule; member 1229 void append_avrule(avrule_t * avrule) in append_avrule() argument 1241 decl->avrules = avrule; in append_avrule() 1243 stack_top->last_avrule->next = avrule; in append_avrule() 1245 stack_top->last_avrule = avrule; in append_avrule() 1454 s->u.avrule = va_arg(ap, avrule_block_t *); in push_stack()
|
D | module_compiler.h | 82 void append_avrule(avrule_t * avrule);
|
/external/selinux/libsepol/cil/src/ |
D | cil_find.c | 294 int cil_find_matching_avrule(struct cil_tree_node *node, struct cil_avrule *avrule, struct cil_avru… in cil_find_matching_avrule() argument 297 struct cil_symtab_datum *s1 = avrule->src; in cil_find_matching_avrule() 298 struct cil_symtab_datum *t1 = avrule->tgt; in cil_find_matching_avrule() 302 if (match_self != CIL_TRUE && avrule == target) goto exit; in cil_find_matching_avrule() 304 if (avrule->rule_kind != target->rule_kind) goto exit; in cil_find_matching_avrule() 306 if (avrule->is_extended != target->is_extended) goto exit; in cil_find_matching_avrule() 335 if (cil_classperms_list_match_any(avrule->perms.classperms, target->perms.classperms)) { in cil_find_matching_avrule() 339 if (cil_permissionx_match_any(avrule->perms.x.permx, target->perms.x.permx)) { in cil_find_matching_avrule()
|
D | cil_write_ast.c | 743 static int cil_write_avrule_x(struct cil_avrule *avrule, FILE *cil_out) { in cil_write_avrule_x() argument 748 switch (avrule->rule_kind) { in cil_write_avrule_x() 762 cil_log(CIL_ERR, "Unknown AVRULE type: %d\n", avrule->rule_kind); in cil_write_avrule_x() 767 src = avrule->src_str; in cil_write_avrule_x() 768 tgt = avrule->tgt_str; in cil_write_avrule_x() 770 if (avrule->perms.x.permx_str != NULL) { in cil_write_avrule_x() 771 xperms = strdup(avrule->perms.x.permx_str); in cil_write_avrule_x() 778 rc = cil_unfill_permx(avrule->perms.x.permx, &xperms); in cil_write_avrule_x() 789 static int cil_write_avrule_orig(struct cil_avrule *avrule, FILE *cil_out) { in cil_write_avrule_orig() argument 794 switch (avrule->rule_kind) { in cil_write_avrule_orig() [all …]
|
D | android.c | 542 struct cil_avrule *avrule = (struct cil_avrule *)node->data; in cil_attrib_avrule() local 544 if (avrule->src != NULL) { in cil_attrib_avrule() 550 key = avrule->src_str; in cil_attrib_avrule() 553 avrule->src_str = __cil_attrib_get_versname(key, args->num); in cil_attrib_avrule() 556 key = avrule->tgt_str; in cil_attrib_avrule() 559 avrule->tgt_str = __cil_attrib_get_versname(key, args->num); in cil_attrib_avrule()
|
D | cil.c | 2192 void cil_avrule_init(struct cil_avrule **avrule) in cil_avrule_init() argument 2194 *avrule = cil_malloc(sizeof(**avrule)); in cil_avrule_init() 2196 (*avrule)->is_extended = 0; in cil_avrule_init() 2197 (*avrule)->rule_kind = CIL_NONE; in cil_avrule_init() 2198 (*avrule)->src_str = NULL; in cil_avrule_init() 2199 (*avrule)->src = NULL; in cil_avrule_init() 2200 (*avrule)->tgt_str = NULL; in cil_avrule_init() 2201 (*avrule)->tgt = NULL; in cil_avrule_init() 2202 memset(&((*avrule)->perms), 0, sizeof((*avrule)->perms)); in cil_avrule_init()
|
D | cil_binary.c | 4517 avrule_t *avrule; in __cil_init_sepol_avrule() local 4522 avrule = cil_malloc(sizeof(avrule_t)); in __cil_init_sepol_avrule() 4523 avrule->specified = kind; in __cil_init_sepol_avrule() 4524 avrule->flags = 0; in __cil_init_sepol_avrule() 4525 __cil_init_sepol_type_set(&avrule->stypes); in __cil_init_sepol_avrule() 4526 __cil_init_sepol_type_set(&avrule->ttypes); in __cil_init_sepol_avrule() 4527 avrule->perms = NULL; in __cil_init_sepol_avrule() 4528 avrule->line = node->line; in __cil_init_sepol_avrule() 4530 avrule->source_filename = NULL; in __cil_init_sepol_avrule() 4531 avrule->source_line = node->line; in __cil_init_sepol_avrule() [all …]
|
D | cil_verify.c | 881 struct cil_avrule *avrule = NULL; in __cil_verify_booleanif_helper() local 882 avrule = rule_node->data; in __cil_verify_booleanif_helper() 883 if (avrule->rule_kind == CIL_AVRULE_NEVERALLOW) { in __cil_verify_booleanif_helper()
|
D | cil_internal.h | 1024 void cil_avrule_init(struct cil_avrule **avrule);
|
D | cil_post.c | 2220 struct cil_avrule *avrule = node->data; in __cil_post_db_classperms_helper() local 2221 rc = __evaluate_classperms_list(avrule->perms.classperms, db); in __cil_post_db_classperms_helper()
|
/external/selinux/libsepol/include/sepol/policydb/ |
D | policydb.h | 266 typedef struct avrule { struct 297 struct avrule *next; argument 683 extern int check_assertion(policydb_t *p, avrule_t *avrule);
|