Lines Matching defs:policydb
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) <
274 if (mls_context_to_sid(policydb, oldc, &r, &context) <
295 struct policydb policydb;
299 if (policydb_init(&policydb))
301 if (policydb_from_image(NULL, data, len, &policydb) < 0)
306 if (load_users(&policydb, path) < 0)
310 if (policydb_to_image(NULL, &policydb, newdata, newlen) < 0)
313 policydb_destroy(&policydb);
317 policydb_destroy(&policydb);
323 int hidden sepol_genusers_policydb(policydb_t * policydb, const char *usersdir)
329 if (load_users(policydb, path) < 0) {
334 if (policydb_reindex_users(policydb) < 0) {