Home
last modified time | relevance | path

Searched refs:typdatum (Results 1 – 6 of 6) sorted by relevance

/external/libsepol/src/
Dcontext.c152 type_datum_t *typdatum; in context_from_record() local
186 typdatum = (type_datum_t *) hashtab_search(policydb->p_types.table, in context_from_record()
188 if (!typdatum || typdatum->flavor == TYPE_ATTRIB) { in context_from_record()
192 scontext->type = typdatum->s.value; in context_from_record()
Dwrite.c1071 type_datum_t *typdatum; in type_write() local
1078 typdatum = (type_datum_t *) datum; in type_write()
1086 && typdatum->flavor == TYPE_ATTRIB) in type_write()
1092 buf[items++] = cpu_to_le32(typdatum->s.value); in type_write()
1098 buf[items++] = cpu_to_le32(typdatum->primary); in type_write()
1101 if (typdatum->primary) in type_write()
1104 if (typdatum->flavor == TYPE_ATTRIB) { in type_write()
1106 } else if (typdatum->flavor == TYPE_ALIAS in type_write()
1110 if (typdatum->flags & TYPE_FLAGS_PERMISSIVE in type_write()
1115 buf[items++] = cpu_to_le32(typdatum->bounds); in type_write()
[all …]
Dpolicydb.c874 type_datum_t *typdatum; in type_index() local
876 typdatum = (type_datum_t *) datum; in type_index()
879 if (typdatum->primary) { in type_index()
880 if (!typdatum->s.value || typdatum->s.value > p->p_types.nprim) in type_index()
882 p->p_type_val_to_name[typdatum->s.value - 1] = (char *)key; in type_index()
883 p->type_val_to_struct[typdatum->s.value - 1] = typdatum; in type_index()
2249 type_datum_t *typdatum; in type_read() local
2255 typdatum = calloc(1, sizeof(type_datum_t)); in type_read()
2256 if (!typdatum) in type_read()
2278 typdatum->s.value = le32_to_cpu(buf[++pos]); in type_read()
[all …]
Dservices.c1495 type_datum_t *typdatum; in convert_context() local
1527 typdatum = (type_datum_t *) in convert_context()
1530 if (!typdatum) { in convert_context()
1533 c->type = typdatum->s.value; in convert_context()
/external/checkpolicy/
Dmodule_compiler.c310 type_datum_t *typdatum; in declare_type() local
326 typdatum = (type_datum_t *) malloc(sizeof(type_datum_t)); in declare_type()
327 if (!typdatum) { in declare_type()
332 type_datum_init(typdatum); in declare_type()
333 typdatum->primary = primary; in declare_type()
334 typdatum->flavor = isattr ? TYPE_ATTRIB : TYPE_TYPE; in declare_type()
336 retval = declare_symbol(SYM_TYPES, id, typdatum, &value, &value); in declare_type()
338 if (typdatum->primary) { in declare_type()
339 typdatum->s.value = value; in declare_type()
344 type_datum_destroy(typdatum); in declare_type()
[all …]
Dpolicy_define.c2496 type_datum_t *typdatum; in define_filename_trans() local
2549 typdatum = hashtab_search(policydbp->p_types.table, id); in define_filename_trans()
2550 if (!typdatum) { in define_filename_trans()
2555 otype = typdatum->s.value; in define_filename_trans()
3565 type_datum_t *typdatum; in parse_security_context() local
3658 typdatum = (type_datum_t *) hashtab_search(policydbp->p_types.table, in parse_security_context()
3660 if (!typdatum || typdatum->flavor == TYPE_ATTRIB) { in parse_security_context()
3665 c->type = typdatum->s.value; in parse_security_context()