Lines Matching defs:policydb
57 #include <sepol/policydb/policydb.h>
58 #include <sepol/policydb/sidtab.h>
59 #include <sepol/policydb/services.h>
60 #include <sepol/policydb/conditional.h>
61 #include <sepol/policydb/flask.h>
62 #include <sepol/policydb/util.h>
77 static policydb_t mypolicydb, *policydb = &mypolicydb;
131 policydb = p;
153 policydb = &mypolicydb;
220 if (policydb->policy_type == POLICY_KERN &&
221 policydb->policyvers >= POLICYDB_VERSION_CONSTRAINT_NAMES &&
252 policydb->p_user_val_to_name[i]);
256 policydb->p_role_val_to_name[i]);
260 policydb->p_type_val_to_name[i]);
343 policydb->p_class_val_to_name[tclass - 1]);
351 sepol_av_to_string(policydb, tclass, constraint->permissions));
499 r1 = policydb->role_val_to_struct[val1 - 1];
500 r2 = policydb->role_val_to_struct[val2 - 1];
835 if (!tclass || tclass > policydb->p_classes.nprim) {
839 tclass_datum = policydb->class_val_to_struct[tclass - 1];
857 sattr = &policydb->type_attr_map[scontext->type - 1];
858 tattr = &policydb->type_attr_map[tcontext->type - 1];
868 avtab_search_node(&policydb->te_avtab, &avkey);
882 cond_compute_av(&policydb->te_cond_avtab, &avkey, avd);
920 for (ra = policydb->role_allow; ra; ra = ra->next) {
949 if (!tclass || tclass > policydb->p_classes.nprim) {
953 tclass_datum = policydb->class_val_to_struct[tclass - 1];
1083 class = policydb->p_class_val_to_name[id - 1];
1106 if (!tclass || tclass > policydb->p_classes.nprim) {
1110 tclass_datum = policydb->class_val_to_struct[tclass - 1];
1157 rc = context_to_string(NULL, policydb, context, scontext, scontext_len);
1174 if (context_from_string(NULL, policydb, &context,
1210 context_to_string(NULL, policydb, scontext, &s, &slen);
1211 context_to_string(NULL, policydb, tcontext, &t, &tlen);
1212 context_to_string(NULL, policydb, newcontext, &n, &nlen);
1215 n, s, t, policydb->p_class_val_to_name[tclass - 1]);
1282 avdatum = avtab_search(&policydb->te_avtab, &avkey);
1286 node = avtab_search_node(&policydb->te_cond_avtab, &avkey);
1306 for (roletr = policydb->role_tr; roletr;
1323 rc = mls_compute_sid(policydb, scontext, tcontext, tclass, specified,
1329 if (!policydb_context_isvalid(policydb, &newcontext)) {
1470 context_to_string(NULL, policydb, context, &s, &len);
1550 context_to_string(NULL, policydb, &oldc, &s, &len);
1652 (policydb->p_classes.table, validate_class, &newpolicydb)) {
1667 args.oldp = policydb;
1671 /* Save the old policydb and SID table to free later. */
1672 memcpy(&oldpolicydb, policydb, sizeof *policydb);
1675 /* Install the new policydb and SID table. */
1676 memcpy(policydb, &newpolicydb, sizeof *policydb);
1679 /* Free the old policydb and SID table. */
1706 c = policydb->ocontexts[OCON_FS];
1749 c = policydb->ocontexts[OCON_PORT];
1788 c = policydb->ocontexts[OCON_NETIF];
1857 c = policydb->ocontexts[OCON_NODE];
1872 c = policydb->ocontexts[OCON_NODE6];
1932 user = (user_datum_t *) hashtab_search(policydb->p_users.table,
1950 role = policydb->role_val_to_struct[i];
1960 (fromcon, user, &usercon, policydb->mls))
2021 for (genfs = policydb->genfs; genfs; genfs = genfs->next) {
2064 c = policydb->ocontexts[OCON_FSUSE];