Lines Matching refs:policydb
35 static int load_users(struct policydb *policydb, const char *path) argument
87 usrdatum = hashtab_search(policydb->p_users.table, q);
105 usrdatum->s.value = ++policydb->p_users.nprim;
107 if (hashtab_insert(policydb->p_users.table,
154 roldatum = hashtab_search(policydb->p_roles.table, q);
175 if (policydb->mls) {
218 if (mls_context_to_sid(policydb, oldc, &r, &context) <
264 if (mls_context_to_sid(policydb, oldc, &r, &context) <
285 struct policydb policydb; local
289 if (policydb_init(&policydb))
291 if (policydb_from_image(NULL, data, len, &policydb) < 0)
296 if (load_users(&policydb, path) < 0)
300 if (policydb_to_image(NULL, &policydb, newdata, newlen) < 0)
303 policydb_destroy(&policydb);
307 policydb_destroy(&policydb);
313 int hidden sepol_genusers_policydb(policydb_t * policydb, const char *usersdir) argument
319 if (load_users(policydb, path) < 0) {
324 if (policydb_reindex_users(policydb) < 0) {