Searched refs:avrule (Results 1 - 21 of 21) sorted by relevance

/external/selinux/libsepol/src/
H A Dassertion.c34 avrule_t *avrule; member in struct:avtab_match_args
39 static void report_failure(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, argument
43 if (avrule->source_filename) {
45 avrule->source_line, avrule->source_filename, avrule->line,
50 } else if (avrule->line) {
52 avrule->line, p->p_type_val_to_name[stype],
141 policydb_t *p, const avrule_t *avrule,
176 rc = check_extended_permissions(avrule
140 report_assertion_extended_permissions(sepol_handle_t *handle, policydb_t *p, const avrule_t *avrule, unsigned int stype, unsigned int ttype, const class_perm_node_t *curperm, uint32_t perms, avtab_key_t *k, avtab_t *avtab) argument
218 avrule_t *avrule = a->avrule; local
303 report_assertion_failures(sepol_handle_t *handle, policydb_t *p, avrule_t *avrule) argument
331 check_assertion_extended_permissions_avtab(avrule_t *avrule, avtab_t *avtab, unsigned int stype, unsigned int ttype, avtab_key_t *k, policydb_t *p) argument
390 check_assertion_extended_permissions(avrule_t *avrule, avtab_t *avtab, avtab_key_t *k, policydb_t *p) argument
471 avrule_t *avrule = a->avrule; local
520 check_assertion(policydb_t *p, avrule_t *avrule) argument
[all...]
H A Dwrite.c1616 static int avrule_write(avrule_t * avrule, struct policy_file *fp) argument
1622 if (avrule->specified & AVRULE_XPERMS) {
1629 buf[items++] = cpu_to_le32(avrule->specified);
1630 buf[items++] = cpu_to_le32(avrule->flags);
1635 if (type_set_write(&avrule->stypes, fp))
1638 if (type_set_write(&avrule->ttypes, fp))
1641 cur = avrule->perms;
1652 cur = avrule->perms;
1670 avrule_t *avrule; local
1672 avrule
[all...]
H A Dmodule_to_cil.c578 log_err("Unknown avrule type: %i", type);
687 log_err("Unknown avrule xperm type: %i", type);
1165 static int avrule_list_to_cil(int indent, struct policydb *pdb, struct avrule *avrule_list, struct list *attr_list)
1168 struct avrule *avrule; local
1174 for (avrule = avrule_list; avrule != NULL; avrule = avrule->next) {
1175 if ((avrule
[all...]
H A Dexpand.c2630 avrule_t *avrule; local
2644 avrule = (avrule_t *) malloc(sizeof(avrule_t));
2645 if (!avrule)
2648 avrule_init(avrule);
2649 avrule->specified = source_rule->specified;
2650 avrule->line = source_rule->line;
2651 avrule->flags = source_rule->flags;
2652 avrule->source_line = source_rule->source_line;
2654 avrule->source_filename = strdup(source_rule->source_filename);
2655 if (!avrule
[all...]
H A Dpolicydb.c3205 avrule_t *avrule; local
3208 avrule = (avrule_t *) malloc(sizeof(avrule_t));
3209 if (!avrule)
3212 avrule_init(avrule);
3218 (avrule)->specified = le32_to_cpu(buf[0]);
3219 (avrule)->flags = le32_to_cpu(buf[1]);
3221 if (type_set_read(&avrule->stypes, fp))
3224 if (type_set_read(&avrule->ttypes, fp))
3248 avrule->perms = cur;
3255 return avrule;
[all...]
/external/selinux/checkpolicy/test/
H A Ddismod.c214 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/selinux/python/sepolgen/src/sepolgen/
H A Daccess.py155 def avrule_to_access_vectors(avrule):
156 """Convert an avrule into a list of access vectors.
160 object class. This function expands a single avrule into a
166 if isinstance(avrule, AccessVector):
167 return [avrule]
169 for src_type in avrule.src_types:
170 for tgt_type in avrule.tgt_types:
171 for obj_class in avrule.obj_classes:
176 access.perms = avrule.perms.copy()
H A Dpolicygen.py375 for avrule in node.avrules():
376 r.types.update(avrule.src_types)
377 r.types.update(avrule.tgt_types)
378 for obj in avrule.obj_classes:
379 r.add_obj_class(obj, avrule.perms)
H A Dinterfaces.py264 for avrule in interface.avrules():
265 if avrule.rule_type != refpolicy.AVRule.ALLOW:
271 avs = access.avrule_to_access_vectors(avrule)
/external/selinux/libsepol/cil/src/
H A Dcil_find.c294 int cil_find_matching_avrule(struct cil_tree_node *node, struct cil_avrule *avrule, struct cil_avrule *target, struct cil_list *matching, int match_self) argument
297 struct cil_symtab_datum *s1 = avrule->src;
298 struct cil_symtab_datum *t1 = avrule->tgt;
302 if (match_self != CIL_TRUE && avrule == target) goto exit;
304 if (avrule->rule_kind != target->rule_kind) goto exit;
306 if (avrule->is_extended != target->is_extended) goto exit;
335 if (cil_classperms_list_match_any(avrule->perms.classperms, target->perms.classperms)) {
339 if (cil_permissionx_match_any(avrule->perms.x.permx, target->perms.x.permx)) {
386 cil_log(CIL_ERR, "An error occurred while searching for avrule in AST\n");
H A Dcil_write_ast.c725 static int cil_write_avrule_x(struct cil_avrule *avrule, FILE *cil_out) { argument
730 switch (avrule->rule_kind) {
744 cil_log(CIL_ERR, "Unknown AVRULE type: %d\n", avrule->rule_kind);
749 src = avrule->src_str;
750 tgt = avrule->tgt_str;
752 if (avrule->perms.x.permx_str != NULL) {
753 xperms = strdup(avrule->perms.x.permx_str);
760 rc = cil_unfill_permx(avrule->perms.x.permx, &xperms);
771 static int cil_write_avrule_orig(struct cil_avrule *avrule, FILE *cil_out) { argument
776 switch (avrule
810 struct cil_avrule *avrule = (struct cil_avrule *)node->data; local
[all...]
H A Dandroid.c542 struct cil_avrule *avrule = (struct cil_avrule *)node->data; local
544 if (avrule->src != NULL) {
550 key = avrule->src_str;
553 avrule->src_str = __cil_attrib_get_versname(key, args->num);
556 key = avrule->tgt_str;
559 avrule->tgt_str = __cil_attrib_get_versname(key, args->num);
H A Dcil.c2142 void cil_avrule_init(struct cil_avrule **avrule) argument
2144 *avrule = cil_malloc(sizeof(**avrule));
2146 (*avrule)->is_extended = 0;
2147 (*avrule)->rule_kind = CIL_NONE;
2148 (*avrule)->src_str = NULL;
2149 (*avrule)->src = NULL;
2150 (*avrule)->tgt_str = NULL;
2151 (*avrule)->tgt = NULL;
2152 memset(&((*avrule)
[all...]
H A Dcil_binary.c1963 cil_tree_log(node, CIL_ERR, "Failed to insert avrule into avtab");
4414 avrule_t *avrule; local
4419 avrule = cil_malloc(sizeof(avrule_t));
4420 avrule->specified = kind;
4421 avrule->flags = 0;
4422 __cil_init_sepol_type_set(&avrule->stypes);
4423 __cil_init_sepol_type_set(&avrule->ttypes);
4424 avrule->perms = NULL;
4425 avrule->line = node->line;
4427 avrule
4511 __cil_print_rule(const char *pad, const char *kind, struct cil_avrule *avrule) argument
[all...]
H A Dcil_verify.c881 struct cil_avrule *avrule = NULL; local
882 avrule = rule_node->data;
883 if (avrule->rule_kind == CIL_AVRULE_NEVERALLOW) {
H A Dcil_internal.h991 void cil_avrule_init(struct cil_avrule **avrule);
H A Dcil_post.c1898 struct cil_avrule *avrule = node->data; local
1899 rc = __evaluate_classperms_list(avrule->perms.classperms, db);
2032 cil_log(CIL_ERR, "Policy must include at least one avrule\n");
/external/selinux/checkpolicy/
H A Dpolicy_define.c1530 avrule_t *avrule; local
1535 avrule = malloc(sizeof(avrule_t));
1536 if (!avrule) {
1540 avrule_init(avrule);
1541 avrule->specified = which;
1542 avrule->line = policydb_lineno;
1543 avrule->source_line = source_lineno;
1544 avrule->source_filename = strdup(source_file);
1545 if (!avrule->source_filename) {
1551 if (set_types(&avrule
1611 avrule_t *avrule; local
1635 avrule_t *avrule; local
1955 avrule_t *avrule; local
2317 avrule_t *avrule; local
2418 avrule_t *avrule; local
2567 avrule_t *avrule; local
2587 avrule_t *avrule; local
[all...]
H A Dmodule_compiler.h82 void append_avrule(avrule_t * avrule);
103 /* Called whenever existing an avrule block. Check that the block had
H A Dmodule_compiler.c25 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 */
117 /* the first declaration within the global avrule
1228 void append_avrule(avrule_t * avrule) argument
1240 decl->avrules = avrule;
1242 stack_top->last_avrule->next = avrule;
1244 stack_top->last_avrule = avrule;
1300 /* allocate a new avrule bloc
[all...]
/external/selinux/libsepol/include/sepol/policydb/
H A Dpolicydb.h259 typedef struct avrule { struct
290 struct avrule *next;
667 extern int check_assertion(policydb_t *p, avrule_t *avrule);

Completed in 686 milliseconds