/third_party/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 | 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 | policydb_validate.c | 429 static int validate_avrules(sepol_handle_t *handle, avrule_t *avrule, validate_t flavors[]) in validate_avrules() argument 433 for (; avrule; avrule = avrule->next) { in validate_avrules() 434 if (validate_type_set(&avrule->stypes, &flavors[SYM_TYPES])) in validate_avrules() 436 if (validate_type_set(&avrule->ttypes, &flavors[SYM_TYPES])) in validate_avrules() 438 class = avrule->perms; in validate_avrules()
|
D | write.c | 1741 static int avrule_write(policydb_t *p, avrule_t * avrule, in avrule_write() argument 1749 buf[items++] = cpu_to_le32(avrule->specified); in avrule_write() 1750 buf[items++] = cpu_to_le32(avrule->flags); in avrule_write() 1755 if (type_set_write(&avrule->stypes, fp)) in avrule_write() 1758 if (type_set_write(&avrule->ttypes, fp)) in avrule_write() 1761 cur = avrule->perms; in avrule_write() 1772 cur = avrule->perms; in avrule_write() 1784 if (avrule->specified & AVRULE_XPERMS) { in avrule_write() 1785 size_t nel = ARRAY_SIZE(avrule->xperms->perms); in avrule_write() 1806 buf8 = avrule->xperms->specified; in avrule_write() [all …]
|
D | expand.c | 2614 avrule_t *avrule; in copy_neverallow() local 2628 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in copy_neverallow() 2629 if (!avrule) in copy_neverallow() 2632 avrule_init(avrule); in copy_neverallow() 2633 avrule->specified = source_rule->specified; in copy_neverallow() 2634 avrule->line = source_rule->line; in copy_neverallow() 2635 avrule->flags = source_rule->flags; in copy_neverallow() 2636 avrule->source_line = source_rule->source_line; in copy_neverallow() 2638 avrule->source_filename = strdup(source_rule->source_filename); in copy_neverallow() 2639 if (!avrule->source_filename) in copy_neverallow() [all …]
|
D | policydb.c | 3491 avrule_t *avrule; in avrule_read() local 3494 avrule = (avrule_t *) malloc(sizeof(avrule_t)); in avrule_read() 3495 if (!avrule) in avrule_read() 3498 avrule_init(avrule); in avrule_read() 3504 avrule->specified = le32_to_cpu(buf[0]); in avrule_read() 3505 avrule->flags = le32_to_cpu(buf[1]); in avrule_read() 3507 if (type_set_read(&avrule->stypes, fp)) in avrule_read() 3510 if (type_set_read(&avrule->ttypes, fp)) in avrule_read() 3534 avrule->perms = cur; in avrule_read() 3541 if (avrule->specified & AVRULE_XPERMS) { in avrule_read() [all …]
|
/third_party/selinux/checkpolicy/test/ |
D | dismod.c | 213 static int display_avrule(avrule_t * avrule, policydb_t * policy, in display_avrule() argument 219 if (avrule == NULL) { in display_avrule() 223 if (avrule->specified & AVRULE_AV) { in display_avrule() 224 if (avrule->specified & AVRULE_ALLOWED) { in display_avrule() 227 if (avrule->specified & AVRULE_AUDITALLOW) { in display_avrule() 230 if (avrule->specified & AVRULE_DONTAUDIT) { in display_avrule() 233 } else if (avrule->specified & AVRULE_TYPE) { in display_avrule() 234 if (avrule->specified & AVRULE_TRANSITION) { in display_avrule() 237 if (avrule->specified & AVRULE_MEMBER) { in display_avrule() 240 if (avrule->specified & AVRULE_CHANGE) { in display_avrule() [all …]
|
/third_party/selinux/checkpolicy/ |
D | policy_define.c | 1611 avrule_t *avrule; in define_compute_type_helper() local 1616 avrule = malloc(sizeof(avrule_t)); in define_compute_type_helper() 1617 if (!avrule) { in define_compute_type_helper() 1621 avrule_init(avrule); in define_compute_type_helper() 1622 avrule->specified = which; in define_compute_type_helper() 1623 avrule->line = policydb_lineno; in define_compute_type_helper() 1624 avrule->source_line = source_lineno; in define_compute_type_helper() 1625 avrule->source_filename = strdup(source_file); in define_compute_type_helper() 1626 if (!avrule->source_filename) { in define_compute_type_helper() 1632 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()
|
/third_party/selinux/libsepol/cil/src/ |
D | cil_find.c | 295 int cil_find_matching_avrule(struct cil_tree_node *node, struct cil_avrule *avrule, struct cil_avru… in cil_find_matching_avrule() argument 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() 303 if (match_self != CIL_TRUE && avrule == target) goto exit; in cil_find_matching_avrule() 305 if (avrule->rule_kind != target->rule_kind) goto exit; in cil_find_matching_avrule() 307 if (avrule->is_extended != target->is_extended) goto exit; in cil_find_matching_avrule() 336 if (cil_classperms_list_match_any(avrule->perms.classperms, target->perms.classperms)) { in cil_find_matching_avrule() 340 if (cil_permissionx_match_any(avrule->perms.x.permx, target->perms.x.permx)) { in cil_find_matching_avrule()
|
D | cil.c | 2439 void cil_avrule_init(struct cil_avrule **avrule) in cil_avrule_init() argument 2441 *avrule = cil_malloc(sizeof(**avrule)); in cil_avrule_init() 2443 (*avrule)->is_extended = 0; in cil_avrule_init() 2444 (*avrule)->rule_kind = CIL_NONE; in cil_avrule_init() 2445 (*avrule)->src_str = NULL; in cil_avrule_init() 2446 (*avrule)->src = NULL; in cil_avrule_init() 2447 (*avrule)->tgt_str = NULL; in cil_avrule_init() 2448 (*avrule)->tgt = NULL; in cil_avrule_init() 2449 memset(&((*avrule)->perms), 0, sizeof((*avrule)->perms)); in cil_avrule_init()
|
D | cil_binary.c | 4480 avrule_t *avrule; in __cil_init_sepol_avrule() local 4486 avrule = cil_malloc(sizeof(avrule_t)); in __cil_init_sepol_avrule() 4487 avrule->specified = kind; in __cil_init_sepol_avrule() 4488 avrule->flags = 0; in __cil_init_sepol_avrule() 4489 __cil_init_sepol_type_set(&avrule->stypes); in __cil_init_sepol_avrule() 4490 __cil_init_sepol_type_set(&avrule->ttypes); in __cil_init_sepol_avrule() 4491 avrule->perms = NULL; in __cil_init_sepol_avrule() 4492 avrule->line = node->line; in __cil_init_sepol_avrule() 4494 avrule->source_filename = NULL; in __cil_init_sepol_avrule() 4495 avrule->source_line = node->line; in __cil_init_sepol_avrule() [all …]
|
D | cil_verify.c | 1028 struct cil_avrule *avrule = NULL; in __cil_verify_booleanif_helper() local 1029 avrule = rule_node->data; in __cil_verify_booleanif_helper() 1030 if (avrule->rule_kind == CIL_AVRULE_NEVERALLOW) { in __cil_verify_booleanif_helper()
|
D | cil_internal.h | 1037 void cil_avrule_init(struct cil_avrule **avrule);
|
D | cil_post.c | 2234 struct cil_avrule *avrule = node->data; in __cil_post_db_classperms_helper() local 2235 rc = __evaluate_classperms_list(avrule->perms.classperms, db); in __cil_post_db_classperms_helper()
|
/third_party/selinux/libsepol/include/sepol/policydb/ |
D | policydb.h | 268 typedef struct avrule { struct 299 struct avrule *next; argument 698 extern int check_assertion(policydb_t *p, avrule_t *avrule);
|