/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 172 rc = check_extended_permissions(avrule->xperms, xperms); in report_assertion_extended_permissions() 175 extended_permissions_violated(&error, avrule->xperms, xperms); in report_assertion_extended_permissions() 178 avrule->source_line, avrule->source_filename, avrule->line, in report_assertion_extended_permissions() [all …]
|
D | write.c | 1677 static int avrule_write(policydb_t *p, avrule_t * avrule, in avrule_write() argument 1685 buf[items++] = cpu_to_le32(avrule->specified); in avrule_write() 1686 buf[items++] = cpu_to_le32(avrule->flags); in avrule_write() 1691 if (type_set_write(&avrule->stypes, fp)) in avrule_write() 1694 if (type_set_write(&avrule->ttypes, fp)) in avrule_write() 1697 cur = avrule->perms; in avrule_write() 1708 cur = avrule->perms; in avrule_write() 1720 if (avrule->specified & AVRULE_XPERMS) { in avrule_write() 1721 size_t nel = ARRAY_SIZE(avrule->xperms->perms); in avrule_write() 1742 buf8 = avrule->xperms->specified; in avrule_write() [all …]
|
D | module_to_cil.c | 1181 static int avrule_list_to_cil(int indent, struct policydb *pdb, struct avrule *avrule_list, struct … in avrule_list_to_cil() 1184 struct avrule *avrule; in avrule_list_to_cil() local 1190 for (avrule = avrule_list; avrule != NULL; avrule = avrule->next) { in avrule_list_to_cil() 1191 if ((avrule->specified & (AVRULE_NEVERALLOW|AVRULE_XPERMS_NEVERALLOW)) && in avrule_list_to_cil() 1192 avrule->source_filename) { in avrule_list_to_cil() 1193 cil_println(0, ";;* lmx %lu %s\n",avrule->source_line, avrule->source_filename); in avrule_list_to_cil() 1196 ts = &avrule->stypes; in avrule_list_to_cil() 1202 ts = &avrule->ttypes; in avrule_list_to_cil() 1210 if (avrule->specified & AVRULE_XPERMS) { in avrule_list_to_cil() 1211 …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 | 2610 avrule_t *avrule; in copy_neverallow() local 2624 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in copy_neverallow() 2625 if (!avrule) in copy_neverallow() 2628 avrule_init(avrule); in copy_neverallow() 2629 avrule->specified = source_rule->specified; in copy_neverallow() 2630 avrule->line = source_rule->line; in copy_neverallow() 2631 avrule->flags = source_rule->flags; in copy_neverallow() 2632 avrule->source_line = source_rule->source_line; in copy_neverallow() 2634 avrule->source_filename = strdup(source_rule->source_filename); in copy_neverallow() 2635 if (!avrule->source_filename) in copy_neverallow() [all …]
|
D | policydb.c | 3321 avrule_t *avrule; in avrule_read() local 3324 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in avrule_read() 3325 if (!avrule) in avrule_read() 3328 avrule_init(avrule); in avrule_read() 3334 avrule->specified = le32_to_cpu(buf[0]); in avrule_read() 3335 avrule->flags = le32_to_cpu(buf[1]); in avrule_read() 3337 if (type_set_read(&avrule->stypes, fp)) in avrule_read() 3340 if (type_set_read(&avrule->ttypes, fp)) in avrule_read() 3364 avrule->perms = cur; in avrule_read() 3371 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 | 1620 avrule_t *avrule; in define_compute_type_helper() local 1625 avrule = malloc(sizeof(avrule_t)); in define_compute_type_helper() 1626 if (!avrule) { in define_compute_type_helper() 1630 avrule_init(avrule); in define_compute_type_helper() 1631 avrule->specified = which; in define_compute_type_helper() 1632 avrule->line = policydb_lineno; in define_compute_type_helper() 1633 avrule->source_line = source_lineno; in define_compute_type_helper() 1634 avrule->source_filename = strdup(source_file); in define_compute_type_helper() 1635 if (!avrule->source_filename) { in define_compute_type_helper() 1641 if (set_types(&avrule->stypes, id, &add, 0)) in define_compute_type_helper() [all …]
|
D | module_compiler.h | 82 void append_avrule(avrule_t * avrule);
|
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()
|
/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 | 2355 void cil_avrule_init(struct cil_avrule **avrule) in cil_avrule_init() argument 2357 *avrule = cil_malloc(sizeof(**avrule)); in cil_avrule_init() 2359 (*avrule)->is_extended = 0; in cil_avrule_init() 2360 (*avrule)->rule_kind = CIL_NONE; in cil_avrule_init() 2361 (*avrule)->src_str = NULL; in cil_avrule_init() 2362 (*avrule)->src = NULL; in cil_avrule_init() 2363 (*avrule)->tgt_str = NULL; in cil_avrule_init() 2364 (*avrule)->tgt = NULL; in cil_avrule_init() 2365 memset(&((*avrule)->perms), 0, sizeof((*avrule)->perms)); in cil_avrule_init()
|
D | cil_binary.c | 4397 avrule_t *avrule; in __cil_init_sepol_avrule() local 4402 avrule = cil_malloc(sizeof(avrule_t)); in __cil_init_sepol_avrule() 4403 avrule->specified = kind; in __cil_init_sepol_avrule() 4404 avrule->flags = 0; in __cil_init_sepol_avrule() 4405 __cil_init_sepol_type_set(&avrule->stypes); in __cil_init_sepol_avrule() 4406 __cil_init_sepol_type_set(&avrule->ttypes); in __cil_init_sepol_avrule() 4407 avrule->perms = NULL; in __cil_init_sepol_avrule() 4408 avrule->line = node->line; in __cil_init_sepol_avrule() 4410 avrule->source_filename = NULL; in __cil_init_sepol_avrule() 4411 avrule->source_line = node->line; in __cil_init_sepol_avrule() [all …]
|
D | cil_verify.c | 883 struct cil_avrule *avrule = NULL; in __cil_verify_booleanif_helper() local 884 avrule = rule_node->data; in __cil_verify_booleanif_helper() 885 if (avrule->rule_kind == CIL_AVRULE_NEVERALLOW) { in __cil_verify_booleanif_helper()
|
D | cil_internal.h | 1026 void cil_avrule_init(struct cil_avrule **avrule);
|
D | cil_post.c | 2212 struct cil_avrule *avrule = node->data; in __cil_post_db_classperms_helper() local 2213 rc = __evaluate_classperms_list(avrule->perms.classperms, db); in __cil_post_db_classperms_helper()
|
/external/selinux/libsepol/include/sepol/policydb/ |
D | policydb.h | 267 typedef struct avrule { struct 298 struct avrule *next; argument 686 extern int check_assertion(policydb_t *p, avrule_t *avrule);
|