Cleanup some implementations

This commit is contained in:
topjohnwu
2020-05-24 04:16:40 -07:00
parent 51eeb89f67
commit 951273f8ef
6 changed files with 263 additions and 288 deletions

View File

@@ -8,19 +8,17 @@ struct sepol_impl : public sepolicy {
int set_attr(const char *attr_name, int type_val);
void check_avtab_node(avtab_ptr_t node);
avtab_ptr_t get_avtab_node(avtab_key_t *key, avtab_extended_perms_t *xperms);
int add_avrule(avtab_key_t *key, int val, bool n);
int add_rule(const char *s, const char *t, const char *c, const char *p, int effect, bool n);
int add_rule(type_datum_t *src, type_datum_t *tgt, class_datum_t *cls, perm_datum_t *perm, int effect, bool n);
int add_avxrule(avtab_key_t *key, uint16_t low, uint16_t high, bool n);
int add_xperm_rule(type_datum_t *src, type_datum_t *tgt,
bool add_rule(const char *s, const char *t, const char *c, const char *p, int effect, bool n);
void add_rule(type_datum_t *src, type_datum_t *tgt, class_datum_t *cls, perm_datum_t *perm, int effect, bool n);
void add_xperm_rule(type_datum_t *src, type_datum_t *tgt,
class_datum_t *cls, uint16_t low, uint16_t high, int effect, bool n);
int add_xperm_rule(const char *s, const char *t, const char *c, const char *range, int effect, bool n);
int create_domain(const char *type_name);
int set_domain_state(const char *s, bool permissive);
int add_filename_trans(const char *s, const char *t, const char *c, const char *d, const char *o);
int add_typeattribute(const char *type, const char *attr);
int add_type_rule(const char *s, const char *t, const char *c, const char *d, int effect);
int add_genfscon(const char *fs_name, const char *path, const char *context);
bool add_xperm_rule(const char *s, const char *t, const char *c, const char *range, int effect, bool n);
bool add_type_rule(const char *s, const char *t, const char *c, const char *d, int effect);
bool add_filename_trans(const char *s, const char *t, const char *c, const char *d, const char *o);
bool add_genfscon(const char *fs_name, const char *path, const char *context);
bool create_domain(const char *type_name);
bool set_domain_state(const char *s, bool permissive);
bool add_typeattribute(const char *type, const char *attr);
void strip_dontaudit();
void allow_su_client(const char *type);
};