Remove unused code

This commit is contained in:
topjohnwu 2020-05-29 10:41:52 -07:00
parent 599ee57d39
commit c071ac8973
2 changed files with 0 additions and 14 deletions

View File

@ -107,19 +107,6 @@ static int avtab_remove_node(avtab_t *h, avtab_ptr_t node) {
return 0; return 0;
} }
int sepol_impl::set_attr(const char *attr_name, int type_val) {
type_datum_t *attr = hashtab_find(db->p_types.table, attr_name);
if (!attr || attr->flavor != TYPE_ATTRIB)
return -1;
if (ebitmap_set_bit(&db->type_attr_map[type_val - 1], attr->s.value - 1, 1))
return -1;
if (ebitmap_set_bit(&db->attr_type_map[attr->s.value - 1], type_val - 1, 1))
return -1;
return attr->s.value;
}
void sepol_impl::check_avtab_node(avtab_ptr_t node) { void sepol_impl::check_avtab_node(avtab_ptr_t node) {
bool redundant; bool redundant;
if (node->key.specified == AVTAB_AUDITDENY) if (node->key.specified == AVTAB_AUDITDENY)

View File

@ -5,7 +5,6 @@
// Internal APIs, do not use directly // Internal APIs, do not use directly
struct sepol_impl : public sepolicy { struct sepol_impl : public sepolicy {
int set_attr(const char *attr_name, int type_val);
void check_avtab_node(avtab_ptr_t node); void check_avtab_node(avtab_ptr_t node);
avtab_ptr_t get_avtab_node(avtab_key_t *key, avtab_extended_perms_t *xperms); avtab_ptr_t get_avtab_node(avtab_key_t *key, avtab_extended_perms_t *xperms);
bool add_rule(const char *s, const char *t, const char *c, const char *p, int effect, bool invert); bool add_rule(const char *s, const char *t, const char *c, const char *p, int effect, bool invert);