Lines Matching refs:policydb

20 static int read_typeset(policydb_t *policydb, char **ptr, char *end,  in read_typeset()  argument
113 type = hashtab_search(policydb->p_types.table, id); in read_typeset()
124 rc = ebitmap_union(&typeset->negset, &policydb->attr_type_map[type->s.value - 1]); in read_typeset()
126 rc = ebitmap_union(&typeset->types, &policydb->attr_type_map[type->s.value - 1]); in read_typeset()
144 for (bit = 0; bit < policydb->p_types.nprim; bit++) { in read_typeset()
147 if (policydb->type_val_to_struct[bit] && in read_typeset()
148 policydb->type_val_to_struct[bit]->flavor == TYPE_ATTRIB) in read_typeset()
163 for (bit = 0; bit < policydb->p_types.nprim; bit++) { in read_typeset()
164 if (policydb->type_val_to_struct[bit] && in read_typeset()
165 policydb->type_val_to_struct[bit]->flavor == TYPE_ATTRIB) in read_typeset()
182 static int read_classperms(policydb_t *policydb, char **ptr, char *end, in read_classperms() argument
247 cls = hashtab_search(policydb->p_classes.table, id); in read_classperms()
335 cls = policydb->class_val_to_struct[node->tclass-1]; in read_classperms()
341 …ed in neverallow undefined in class %s in policy being checked.\n", id, policydb->p_class_val_to_n… in read_classperms()
377 static int check_neverallows(policydb_t *policydb, char *text, char *end) in check_neverallows() argument
413 if (read_typeset(policydb, &p, end, &avrule->stypes, &avrule->flags)) in check_neverallows()
416 if (read_typeset(policydb, &p, end, &avrule->ttypes, &avrule->flags)) in check_neverallows()
419 if (read_classperms(policydb, &p, end, &avrule->perms)) in check_neverallows()
438 result = check_assertions(NULL, policydb, neverallows); in check_neverallows()
454 static int check_neverallows_file(policydb_t *policydb, const char *filename) in check_neverallows_file() argument
478 return check_neverallows(policydb, text, end); in check_neverallows_file()
481 static int check_neverallows_string(policydb_t *policydb, char *string, size_t len) in check_neverallows_string() argument
486 return check_neverallows(policydb, text, end); in check_neverallows_string()
489 int neverallow_func (int argc, char **argv, policydb_t *policydb) { in neverallow_func() argument
526 return check_neverallows_file(policydb, file); in neverallow_func()
528 return check_neverallows_string(policydb, rules, strlen(rules)); in neverallow_func()