Lines Matching refs:policydb
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) {
79 if (mls_to_string(handle, policydb, &context, &str) < 0) {
106 policydb_t *policydb = &p->p;
137 usrdatum = hashtab_search(policydb->p_users.table,
161 roldatum = hashtab_search(policydb->p_roles.table,
180 if (policydb->mls) {
190 if (mls_from_string(handle, policydb, cmls_level, &context) < 0) {
210 if (mls_from_string(handle, policydb, cmls_range, &context) < 0) {
231 tmp_ptr = realloc(policydb->user_val_to_struct,
232 (policydb->p_users.nprim +
236 policydb->user_val_to_struct = tmp_ptr;
238 tmp_ptr = realloc(policydb->sym_val_to_name[SYM_USERS],
239 (policydb->p_users.nprim +
243 policydb->sym_val_to_name[SYM_USERS] = tmp_ptr;
251 usrdatum->s.value = ++policydb->p_users.nprim;
252 if (hashtab_insert(policydb->p_users.table, name,
257 policydb->p_user_val_to_name[usrdatum->s.value - 1] = name;
258 policydb->user_val_to_struct[usrdatum->s.value - 1] = usrdatum;
263 policydb, NULL, NULL)) {
292 const policydb_t *policydb = &p->p;
297 *response = (hashtab_search(policydb->p_users.table,
308 const policydb_t *policydb = &p->p;
309 *response = policydb->p_users.nprim;
320 const policydb_t *policydb = &p->p;
326 usrdatum = hashtab_search(policydb->p_users.table,
334 if (user_to_record(handle, policydb, usrdatum->s.value - 1, response) <
351 const policydb_t *policydb = &p->p;
352 unsigned int nusers = policydb->p_users.nprim;
361 if (user_to_record(handle, policydb, i, &user) < 0)