• Home
  • Raw
  • Download

Lines Matching refs:policydb

77 static policydb_t mypolicydb, *policydb = &mypolicydb;  variable
131 policydb = p; in sepol_set_policydb()
153 policydb = &mypolicydb; in sepol_set_policydb_from_file()
220 if (policydb->policy_type == POLICY_KERN && in get_name_list()
221 policydb->policyvers >= POLICYDB_VERSION_CONSTRAINT_NAMES && in get_name_list()
252 policydb->p_user_val_to_name[i]); in get_name_list()
256 policydb->p_role_val_to_name[i]); in get_name_list()
260 policydb->p_type_val_to_name[i]); in get_name_list()
343 policydb->p_class_val_to_name[tclass - 1]); in get_class_info()
351 sepol_av_to_string(policydb, tclass, constraint->permissions)); in get_class_info()
499 r1 = policydb->role_val_to_struct[val1 - 1]; in constraint_expr_eval_reason()
500 r2 = policydb->role_val_to_struct[val2 - 1]; in constraint_expr_eval_reason()
835 if (!tclass || tclass > policydb->p_classes.nprim) { in context_struct_compute_av()
839 tclass_datum = policydb->class_val_to_struct[tclass - 1]; in context_struct_compute_av()
857 sattr = &policydb->type_attr_map[scontext->type - 1]; in context_struct_compute_av()
858 tattr = &policydb->type_attr_map[tcontext->type - 1]; in context_struct_compute_av()
868 avtab_search_node(&policydb->te_avtab, &avkey); in context_struct_compute_av()
882 cond_compute_av(&policydb->te_cond_avtab, &avkey, avd); in context_struct_compute_av()
920 for (ra = policydb->role_allow; ra; ra = ra->next) { in context_struct_compute_av()
949 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_validate_transition()
953 tclass_datum = policydb->class_val_to_struct[tclass - 1]; in sepol_validate_transition()
1083 class = policydb->p_class_val_to_name[id - 1]; in sepol_string_to_security_class()
1106 if (!tclass || tclass > policydb->p_classes.nprim) { in sepol_string_to_av_perm()
1110 tclass_datum = policydb->class_val_to_struct[tclass - 1]; in sepol_string_to_av_perm()
1157 rc = context_to_string(NULL, policydb, context, scontext, scontext_len); in sepol_sid_to_context()
1174 if (context_from_string(NULL, policydb, &context, in sepol_context_to_sid()
1210 context_to_string(NULL, policydb, scontext, &s, &slen); in compute_sid_handle_invalid_context()
1211 context_to_string(NULL, policydb, tcontext, &t, &tlen); in compute_sid_handle_invalid_context()
1212 context_to_string(NULL, policydb, newcontext, &n, &nlen); in compute_sid_handle_invalid_context()
1215 n, s, t, policydb->p_class_val_to_name[tclass - 1]); in compute_sid_handle_invalid_context()
1282 avdatum = avtab_search(&policydb->te_avtab, &avkey); in sepol_compute_sid()
1286 node = avtab_search_node(&policydb->te_cond_avtab, &avkey); in sepol_compute_sid()
1306 for (roletr = policydb->role_tr; roletr; in sepol_compute_sid()
1323 rc = mls_compute_sid(policydb, scontext, tcontext, tclass, specified, in sepol_compute_sid()
1329 if (!policydb_context_isvalid(policydb, &newcontext)) { in sepol_compute_sid()
1470 context_to_string(NULL, policydb, context, &s, &len); in convert_context_handle_invalid_context()
1550 context_to_string(NULL, policydb, &oldc, &s, &len); in convert_context()
1652 (policydb->p_classes.table, validate_class, &newpolicydb)) { in sepol_load_policy()
1667 args.oldp = policydb; in sepol_load_policy()
1672 memcpy(&oldpolicydb, policydb, sizeof *policydb); in sepol_load_policy()
1676 memcpy(policydb, &newpolicydb, sizeof *policydb); in sepol_load_policy()
1706 c = policydb->ocontexts[OCON_FS]; in sepol_fs_sid()
1749 c = policydb->ocontexts[OCON_PORT]; in sepol_port_sid()
1788 c = policydb->ocontexts[OCON_NETIF]; in sepol_netif_sid()
1857 c = policydb->ocontexts[OCON_NODE]; in sepol_node_sid()
1872 c = policydb->ocontexts[OCON_NODE6]; in sepol_node_sid()
1932 user = (user_datum_t *) hashtab_search(policydb->p_users.table, in sepol_get_user_sids()
1950 role = policydb->role_val_to_struct[i]; in sepol_get_user_sids()
1960 (fromcon, user, &usercon, policydb->mls)) in sepol_get_user_sids()
2021 for (genfs = policydb->genfs; genfs; genfs = genfs->next) { in sepol_genfs_sid()
2064 c = policydb->ocontexts[OCON_FSUSE]; in sepol_fs_use()