/external/libsepol/src/ |
roles.c | 4 #include <sepol/policydb/hashtab.h> 5 #include <sepol/policydb/policydb.h> 15 policydb_t *policydb = &p->p; local 16 *response = (hashtab_search(policydb->p_roles.table, 28 policydb_t *policydb = &p->p; local 29 unsigned int tmp_nroles = policydb->p_roles.nprim; 37 tmp_roles[i] = strdup(policydb->p_role_val_to_name[i]);
|
booleans.c | 9 #include <sepol/policydb/hashtab.h> 10 #include <sepol/policydb/policydb.h> 11 #include <sepol/policydb/conditional.h> 15 policydb_t * policydb, 31 hashtab_search(policydb->p_bools.table, name); 55 const policydb_t * policydb, 59 const char *name = policydb->p_bool_val_to_name[bool_idx]; 60 cond_bool_datum_t *booldatum = policydb->bool_val_to_struct[bool_idx]; 90 policydb_t *policydb = &p->p local 110 const policydb_t *policydb = &p->p; local 122 const policydb_t *policydb = &p->p; local 145 const policydb_t *policydb = &p->p; local 184 const policydb_t *policydb = &p->p; local [all...] |
interfaces.c | 7 #include <sepol/policydb/policydb.h> 13 const policydb_t * policydb, 30 if (context_from_record(handle, policydb, 39 if (context_from_record(handle, policydb, 67 const policydb_t * policydb, 84 if (context_to_record(handle, policydb, ifcon, &tmp_con) < 0) 91 if (context_to_record(handle, policydb, msgcon, &tmp_con) < 0) 114 const policydb_t *policydb = &p->p; local 120 head = policydb->ocontexts[OCON_NETIF] 139 const policydb_t *policydb = &p->p; local 171 policydb_t *policydb = &p->p; local 225 const policydb_t *policydb = &p->p; local 243 const policydb_t *policydb = &p->p; local [all...] |
genbools.c | 6 #include <sepol/policydb/policydb.h> 7 #include <sepol/policydb/conditional.h> 66 static int load_booleans(struct policydb *policydb, const char *path, 96 datum = hashtab_search(policydb->p_bools.table, name); 127 hashtab_search(policydb->p_bools.table, 151 struct policydb policydb; local 155 if (policydb_init(&policydb)) 212 struct policydb policydb; local [all...] |
genusers.c | 8 #include <sepol/policydb/policydb.h> 35 static int load_users(struct policydb *policydb, const char *path) 87 usrdatum = hashtab_search(policydb->p_users.table, q); 113 usrdatum->s.value = ++policydb->p_users.nprim; 114 if (hashtab_insert(policydb->p_users.table, 164 roldatum = hashtab_search(policydb->p_roles.table, q); 185 if (policydb->mls) { 228 if (mls_context_to_sid(policydb, oldc, &r, &context) 295 struct policydb policydb; local [all...] |
nodes.c | 9 #include <sepol/policydb/policydb.h> 15 const policydb_t * policydb, 56 if (context_from_record(handle, policydb, &tmp_con, 84 const policydb_t * policydb, 129 if (context_to_record(handle, policydb, con, &tmp_con) < 0) 153 const policydb_t *policydb = &p->p; local 155 head = policydb->ocontexts[OCON_NODE]; 159 head = policydb->ocontexts[OCON_NODE6]; 175 const policydb_t *policydb = &p->p local 235 const policydb_t *policydb = &p->p; local 301 policydb_t *policydb = &p->p; local 351 const policydb_t *policydb = &p->p; local [all...] |
ports.c | 8 #include <sepol/policydb/policydb.h> 42 const policydb_t * policydb, 74 if (context_from_record(handle, policydb, &tmp_con, 101 const policydb_t * policydb, 124 if (context_to_record(handle, policydb, con, &tmp_con) < 0) 149 const policydb_t *policydb = &p->p; local 151 head = policydb->ocontexts[OCON_PORT]; 167 const policydb_t *policydb = &p->p; local 178 head = policydb->ocontexts[OCON_PORT] 205 const policydb_t *policydb = &p->p; local 245 policydb_t *policydb = &p->p; local 282 const policydb_t *policydb = &p->p; local [all...] |
users.c | 9 #include <sepol/policydb/policydb.h> 10 #include <sepol/policydb/hashtab.h> 11 #include <sepol/policydb/expand.h> 16 const policydb_t * policydb, 20 const char *name = policydb->p_user_val_to_name[user_idx]; 21 user_datum_t *usrdatum = policydb->user_val_to_struct[user_idx]; 37 char *role = policydb->p_role_val_to_name[bit]; 44 if (policydb->mls) { 61 if (mls_to_string(handle, policydb, &context, &str) < 0) 106 policydb_t *policydb = &p->p; local 292 const policydb_t *policydb = &p->p; local 308 const policydb_t *policydb = &p->p; local 320 const policydb_t *policydb = &p->p; local 351 const policydb_t *policydb = &p->p; local [all...] |
services.c | 57 #include <sepol/policydb/policydb.h> 58 #include <sepol/policydb/sidtab.h> 59 #include <sepol/policydb/services.h> 60 #include <sepol/policydb/conditional.h> 61 #include <sepol/policydb/flask.h> 62 #include <sepol/policydb/util.h> 77 static policydb_t mypolicydb, *policydb = &mypolicydb; variable 131 policydb = p; 153 policydb = &mypolicydb [all...] |
/external/sepolicy/tools/sepolicy-analyze/ |
sepolicy-analyze.c | 18 int (*func) (int argc, char **argv, policydb_t *policydb); 42 policydb_t policydb; local 49 if(load_policy(policy, &policydb, &pf)) 53 rc = analyze_components[i].func(argc - 2, argv + 2, &policydb);
|
dups.c | 15 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, &node->key, i, node->datum.data) [all...] |
/external/libsepol/tests/ |
test-downgrade.c | 27 #include <sepol/policydb/policydb.h> 28 #include <sepol/policydb/link.h> 29 #include <sepol/policydb/expand.h> 30 #include <sepol/policydb/conditional.h> 37 static policydb_t policydb; variable 46 * Description: Initialize the policydb (policy data base structure) 51 if (policydb_init(&policydb)) { 66 * Description: Destroys policydb structure 70 policydb_destroy(&policydb); [all...] |
/external/sepolicy/tools/ |
sepolicy-check.c | 9 #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) { 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...] |
/external/checkpolicy/test/ |
dispol.c | 20 #include <sepol/policydb/policydb.h> 21 #include <sepol/policydb/avtab.h> 22 #include <sepol/policydb/services.h> 23 #include <sepol/policydb/conditional.h> 24 #include <sepol/policydb/expand.h> 25 #include <sepol/policydb/util.h> 26 #include <sepol/policydb/polcaps.h> 38 static policydb_t policydb; variable 434 if (policydb_init(&policydb)) { [all...] |
dismod.c | 30 #include <sepol/policydb/policydb.h> 31 #include <sepol/policydb/services.h> 32 #include <sepol/policydb/conditional.h> 33 #include <sepol/policydb/flask.h> 34 #include <sepol/policydb/link.h> 35 #include <sepol/policydb/module.h> 36 #include <sepol/policydb/util.h> 37 #include <sepol/policydb/polcaps.h> 57 static policydb_t policydb; variable [all...] |
/external/checkpolicy/ |
checkpolicy.c | 77 #include <sepol/policydb/policydb.h> 78 #include <sepol/policydb/services.h> 79 #include <sepol/policydb/conditional.h> 80 #include <sepol/policydb/hierarchy.h> 81 #include <sepol/policydb/flask.h> 82 #include <sepol/policydb/expand.h> 83 #include <sepol/policydb/link.h> 92 static policydb_t policydb; variable 234 type_rules = malloc(sizeof(struct avtab_node) * policydb.p_types.nprim) [all...] |
/external/libsepol/include/sepol/policydb/ |
policydb.h | 47 * A policy database (policydb) specifies the 57 #include <sepol/policydb.h> 59 #include <sepol/policydb/flask_types.h> 60 #include <sepol/policydb/symtab.h> 61 #include <sepol/policydb/avtab.h> 62 #include <sepol/policydb/context.h> 63 #include <sepol/policydb/constraint.h> 64 #include <sepol/policydb/sidtab.h> 384 * subtract one) into the global policydb->scope array. */ 463 typedef struct policydb { struct [all...] |