Searched refs:policydb (Results 1 - 18 of 18) sorted by relevance

/system/sepolicy/tools/sepolicy-analyze/
H A Dattribute.h4 #include <sepol/policydb/policydb.h>
9 int attribute_func(int argc, char **argv, policydb_t *policydb);
H A Dbooleans.h4 #include <sepol/policydb/policydb.h>
9 int booleans_func(int argc, char **argv, policydb_t *policydb);
H A Ddups.h4 #include <sepol/policydb/policydb.h>
9 int dups_func(int argc, char **argv, policydb_t *policydb);
H A Dneverallow.h4 #include <sepol/policydb/policydb.h>
9 int neverallow_func(int argc, char **argv, policydb_t *policydb);
H A Dperm.h4 #include <sepol/policydb/policydb.h>
9 int permissive_func(int argc, char **argv, policydb_t *policydb);
H A Dtypecmp.h4 #include <sepol/policydb/policydb.h>
9 int typecmp_func(int argc, char **argv, policydb_t *policydb);
H A Dperm.c7 static int list_permissive(policydb_t * policydb) argument
15 ebitmap_for_each_bit(&policydb->permissive_map, n, bit)
18 printf("%s\n", policydb->p_type_val_to_name[bit -1]);
24 int permissive_func (int argc, __attribute__ ((unused)) char **argv, policydb_t *policydb) { argument
29 return list_permissive(policydb);
H A Dutils.h6 #include <sepol/policydb/avtab.h>
7 #include <sepol/policydb/policydb.h>
12 void display_allow(policydb_t *policydb, avtab_key_t *key, int idx, uint32_t perms);
14 int load_policy(char *filename, policydb_t * policydb, struct policy_file *pf);
H A Dattribute.c7 static int list_attribute(policydb_t * policydb, char *name) argument
13 attr = hashtab_search(policydb->p_types.table, name);
24 ebitmap_for_each_bit(&policydb->attr_type_map[attr->s.value - 1], n, bit) {
27 printf("%s\n", policydb->p_type_val_to_name[bit]);
33 int attribute_func (int argc, char **argv, policydb_t *policydb) { argument
38 return list_attribute(policydb, argv[1]);
H A Ddups.c15 policydb_t *policydb = args; local
33 sattr = &policydb->type_attr_map[k->source_type - 1];
34 tattr = &policydb->type_attr_map[k->target_type - 1];
35 stype = policydb->type_val_to_struct[k->source_type - 1];
36 ttype = policydb->type_val_to_struct[k->target_type - 1];
51 stype2 = policydb->type_val_to_struct[avkey.source_type - 1];
52 ttype2 = policydb->type_val_to_struct[avkey.target_type - 1];
56 for (node = avtab_search_node(&policydb->te_avtab, &avkey);
67 display_allow(policydb, k, i, d->data);
68 display_allow(policydb,
78 find_dups(policydb_t * policydb) argument
85 dups_func(int argc, __attribute__ ((unused)) char **argv, policydb_t *policydb) argument
[all...]
H A Dutils.c2 #include <sepol/policydb/policydb.h>
3 #include <sepol/policydb/util.h>
12 void display_allow(policydb_t *policydb, avtab_key_t *key, int idx, uint32_t perms) argument
15 policydb->p_type_val_to_name[key->source_type
18 policydb->p_type_val_to_name[key->target_type
20 policydb->p_class_val_to_name[key->target_class - 1],
22 (policydb, key->target_class, perms));
25 int load_policy(char *filename, policydb_t * policydb, struct policy_file *pf) argument
53 if (policydb_init(policydb)) {
[all...]
H A Dbooleans.c16 int booleans_func (int argc, __attribute__ ((unused)) char **argv, policydb_t *policydb) { argument
21 return hashtab_map(policydb->p_bools.table, list_booleans, NULL);
H A Dtypecmp.c2 #include <sepol/policydb/expand.h>
120 static int find_match(policydb_t *policydb, struct avtab_node *l1, argument
146 display_allow(policydb, &l1->key, idx1, perms1);
148 display_allow(policydb, &c->key, idx2, perms2);
157 static int analyze_types(policydb_t * policydb, char diff, char equiv) argument
168 type_rules = malloc(sizeof(struct avtab_node) * policydb->p_types.nprim);
173 memset(type_rules, 0, sizeof(struct avtab_node) * policydb->p_types.nprim);
180 if (expand_avtab(policydb, &policydb->te_avtab, &exp_avtab)) {
186 if (expand_avtab(policydb,
267 typecmp_func(int argc, char **argv, policydb_t *policydb) argument
[all...]
H A Dsepolicy-analyze.c20 int (*func) (int argc, char **argv, policydb_t *policydb);
46 policydb_t policydb; local
53 if(load_policy(policy, &policydb, &pf))
57 rc = analyze_components[i].func(argc - 2, argv + 2, &policydb);
H A Dneverallow.c20 static int read_typeset(policydb_t *policydb, char **ptr, char *end, argument
113 type = hashtab_search(policydb->p_types.table, id);
124 rc = ebitmap_union(&typeset->negset, &policydb->attr_type_map[type->s.value - 1]);
126 rc = ebitmap_union(&typeset->types, &policydb->attr_type_map[type->s.value - 1]);
144 for (bit = 0; bit < policydb->p_types.nprim; bit++) {
147 if (policydb->type_val_to_struct[bit] &&
148 policydb->type_val_to_struct[bit]->flavor == TYPE_ATTRIB)
163 for (bit = 0; bit < policydb->p_types.nprim; bit++) {
164 if (policydb->type_val_to_struct[bit] &&
165 policydb
185 read_classperms(policydb_t *policydb, char **ptr, char *end, class_perm_node_t **perms) argument
370 check_neverallows(policydb_t *policydb, char *text, char *end) argument
439 check_neverallows_file(policydb_t *policydb, const char *filename) argument
466 check_neverallows_string(policydb_t *policydb, char *string, size_t len) argument
474 neverallow_func(int argc, char **argv, policydb_t *policydb) argument
[all...]
/system/sepolicy/tools/
H A Dsepolicy-check.c9 #include <sepol/policydb/policydb.h>
10 #include <sepol/policydb/services.h>
11 #include <sepol/policydb/expand.h>
188 int load_policy(char *filename, policydb_t *policydb, struct policy_file *pf) { argument
215 if (policydb_init(policydb)) {
216 fprintf(stderr, "Could not initialize policydb!\n");
221 ret = policydb_read(policydb, pf, 0);
236 policydb_t policydb; local
276 sepol_set_policydb(&policydb);
[all...]
H A Dcheckfc.c8 #include <sepol/policydb/policydb.h>
64 static int get_attr_bit(policydb_t *policydb, const char *attr_name) argument
66 struct type_datum *attr = hashtab_search(policydb->p_types.table, (char *)attr_name);
101 static bool is_type_of_attribute_set(policydb_t *policydb, const char *type_name, argument
104 struct type_datum *type = hashtab_search(policydb->p_types.table, (char *)type_name);
119 int rc = ebitmap_and(&dst, attr_set, &policydb->type_attr_map[type->s.value - 1]);
H A Dcheck_seapp.c13 #include <sepol/policydb/policydb.h>

Completed in 90 milliseconds