Lines Matching defs:policydb
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;
155 if (policydb_init(&policydb))
157 if (policydb_from_image(NULL, data, len, &policydb) < 0)
160 if (load_booleans(&policydb, booleans, &changes) < 0) {
167 if (evaluate_conds(&policydb) < 0) {
177 rc = policydb_write(&policydb, &pf);
185 policydb_destroy(&policydb);
189 policydb_destroy(&policydb);
195 int hidden sepol_genbools_policydb(policydb_t * policydb, const char *booleans)
199 rc = load_booleans(policydb, booleans, &changes);
201 rc = evaluate_conds(policydb);
212 struct policydb policydb;
218 if (policydb_init(&policydb))
220 if (policydb_from_image(NULL, data, len, &policydb) < 0)
224 datum = hashtab_search(policydb.p_bools.table, names[i]);
239 if (evaluate_conds(&policydb) < 0) {
249 rc = policydb_write(&policydb, &pf);
260 policydb_destroy(&policydb);
264 policydb_destroy(&policydb);