/external/selinux/libsepol/src/ |
H A D | assertion.c | 31 const avrule_t * avrule, 36 if (avrule->source_filename) { 38 avrule->source_line, avrule->source_filename, avrule->line, 44 } else if (avrule->line) { 46 avrule->line, p->p_type_val_to_name[stype], 65 const avrule_t * avrule) 72 for (curperm = avrule->perms; curperm != NULL; curperm = curperm->next) { 81 report_failure(handle, p, avrule, styp 30 report_failure(sepol_handle_t *handle, policydb_t *p, const avrule_t * avrule, unsigned int stype, unsigned int ttype, const class_perm_node_t *curperm, const avtab_ptr_t node) argument 61 check_assertion_helper(sepol_handle_t * handle, policydb_t * p, avtab_t * te_avtab, avtab_t * te_cond_avtab, unsigned int stype, unsigned int ttype, const avrule_t * avrule) argument [all...] |
H A D | write.c | 1543 static int avrule_write(avrule_t * avrule, struct policy_file *fp) argument 1549 if (avrule->specified & AVRULE_OP) { 1556 buf[items++] = cpu_to_le32(avrule->specified); 1557 buf[items++] = cpu_to_le32(avrule->flags); 1562 if (type_set_write(&avrule->stypes, fp)) 1565 if (type_set_write(&avrule->ttypes, fp)) 1568 cur = avrule->perms; 1579 cur = avrule->perms; 1597 avrule_t *avrule; local 1599 avrule [all...] |
H A D | expand.c | 2591 avrule_t *avrule; local 2604 avrule = (avrule_t *) malloc(sizeof(avrule_t)); 2605 if (!avrule) 2608 avrule_init(avrule); 2609 avrule->specified = AVRULE_NEVERALLOW; 2610 avrule->line = source_rule->line; 2611 avrule->flags = source_rule->flags; 2612 avrule->source_line = source_rule->source_line; 2614 avrule->source_filename = strdup(source_rule->source_filename); 2615 if (!avrule [all...] |
H A D | module_to_cil.c | 574 log_err("Unknown avrule type: %i", type); 1060 static int avrule_list_to_cil(int indent, struct policydb *pdb, struct avrule *avrule_list, struct list *attr_list) 1063 struct avrule *avrule; local 1072 for (avrule = avrule_list; avrule != NULL; avrule = avrule->next) { 1073 ts = &avrule->stypes; 1079 ts = &avrule [all...] |
H A D | policydb.c | 3042 avrule_t *avrule; local 3045 avrule = (avrule_t *) malloc(sizeof(avrule_t)); 3046 if (!avrule) 3049 avrule_init(avrule); 3055 (avrule)->specified = le32_to_cpu(buf[0]); 3056 (avrule)->flags = le32_to_cpu(buf[1]); 3058 if (type_set_read(&avrule->stypes, fp)) 3061 if (type_set_read(&avrule->ttypes, fp)) 3085 avrule->perms = cur; 3092 return avrule; [all...] |
/external/selinux/checkpolicy/test/ |
H A D | dismod.c | 214 int display_avrule(avrule_t * avrule, policydb_t * policy, argument 220 if (avrule == NULL) { 224 if (avrule->specified & AVRULE_AV) { 225 if (avrule->specified & AVRULE_ALLOWED) { 228 if (avrule->specified & AVRULE_AUDITALLOW) { 231 if (avrule->specified & AVRULE_DONTAUDIT) { 234 } else if (avrule->specified & AVRULE_TYPE) { 235 if (avrule->specified & AVRULE_TRANSITION) { 238 if (avrule->specified & AVRULE_MEMBER) { 241 if (avrule 598 avrule_t *avrule; local 623 avrule_t *avrule = decl->avrules; local [all...] |
/external/sepolicy/tools/sepolicy-analyze/ |
H A D | neverallow.c | 374 struct avrule *neverallows = NULL, *avrule; local 399 avrule = calloc(1, sizeof *avrule); 400 if (!avrule) 403 avrule->specified = AVRULE_NEVERALLOW; 405 if (read_typeset(policydb, &p, end, &avrule->stypes, &avrule->flags)) 408 if (read_typeset(policydb, &p, end, &avrule->ttypes, &avrule [all...] |
/external/selinux/sepolgen/src/sepolgen/ |
H A D | access.py | 154 def avrule_to_access_vectors(avrule): 155 """Convert an avrule into a list of access vectors. 159 object class. This function expands a single avrule into a 165 if isinstance(avrule, AccessVector): 166 return [avrule] 168 for src_type in avrule.src_types: 169 for tgt_type in avrule.tgt_types: 170 for obj_class in avrule.obj_classes: 175 access.perms = avrule.perms.copy()
|
H A D | policygen.py | 377 for avrule in node.avrules(): 378 r.types.update(avrule.src_types) 379 r.types.update(avrule.tgt_types) 380 for obj in avrule.obj_classes: 381 r.add_obj_class(obj, avrule.perms)
|
H A D | interfaces.py | 264 for avrule in interface.avrules(): 265 if avrule.rule_type != refpolicy.AVRule.ALLOW: 271 avs = access.avrule_to_access_vectors(avrule)
|
/external/selinux/checkpolicy/ |
H A D | policy_define.c | 1522 avrule_t *avrule; local 1526 avrule = malloc(sizeof(avrule_t)); 1527 if (!avrule) { 1531 avrule_init(avrule); 1532 avrule->specified = which; 1533 avrule->line = policydb_lineno; 1534 avrule->source_line = source_lineno; 1535 avrule->source_filename = strdup(source_file); 1536 if (!avrule->source_filename) { 1542 if (set_types(&avrule 1600 avrule_t *avrule; local 1624 avrule_t *avrule; local 1947 avrule_t *avrule; local 2268 avrule_t *avrule; local 2352 avrule_t *avrule; local 2492 avrule_t *avrule; local 2512 avrule_t *avrule; local [all...] |
H A D | module_compiler.h | 82 void append_avrule(avrule_t * avrule); 103 /* Called whenever existing an avrule block. Check that the block had
|
H A D | module_compiler.c | 25 avrule_block_t *avrule; member in union:stack_item_u 31 int type; /* for above union: 1 = avrule block, 2 = conditional */ 32 avrule_decl_t *decl; /* if in an avrule block, which 35 int in_else; /* if in an avrule block, within ELSE branch */ 89 /* the first declaration within the global avrule 1348 void append_avrule(avrule_t * avrule) argument 1360 decl->avrules = avrule; 1362 stack_top->last_avrule->next = avrule; 1364 stack_top->last_avrule = avrule; 1420 /* allocate a new avrule bloc [all...] |
/external/selinux/libsepol/cil/src/ |
H A D | cil.c | 2069 void cil_avrule_init(struct cil_avrule **avrule) argument 2071 *avrule = cil_malloc(sizeof(**avrule)); 2073 (*avrule)->rule_kind = CIL_NONE; 2074 (*avrule)->src_str = NULL; 2075 (*avrule)->src = NULL; 2076 (*avrule)->tgt_str = NULL; 2077 (*avrule)->tgt = NULL; 2078 (*avrule)->classperms = NULL;
|
H A D | cil_verify.c | 872 struct cil_avrule *avrule = NULL; local 873 avrule = rule_node->data; 874 if (avrule->rule_kind == CIL_AVRULE_NEVERALLOW) {
|
H A D | cil_internal.h | 930 void cil_avrule_init(struct cil_avrule **avrule);
|
H A D | cil_policy.c | 596 cil_log(CIL_INFO, "Unknown avrule with kind=%d src=%s tgt=%s\n", 1006 struct cil_avrule *avrule = (struct cil_avrule*)current->data; local 1007 rc = cil_avrule_to_policy(file_arr, ALLOWS, avrule); 1009 cil_log(CIL_INFO, "Failed to write avrule to policy\n");
|
H A D | cil_post.c | 1550 struct cil_avrule *avrule = node->data; local 1551 rc = __evaluate_classperms_list(avrule->classperms, db); 1678 cil_log(CIL_ERR, "Policy must include at least one avrule\n");
|
/external/selinux/libsepol/include/sepol/policydb/ |
H A D | policydb.h | 250 typedef struct avrule { struct 286 struct avrule *next;
|