Home | History | Annotate | Download | only in src

Lines Matching refs:policydb

52 #include <sepol/policydb/policydb.h>
53 #include <sepol/policydb/sidtab.h>
54 #include <sepol/policydb/services.h>
55 #include <sepol/policydb/conditional.h>
56 #include <sepol/policydb/flask.h>
71 static policydb_t mypolicydb, *policydb = &mypolicydb;
81 policydb = p;
103 policydb = &mypolicydb;
170 r1 = policydb->role_val_to_struct[val1 - 1];
171 r2 = policydb->role_val_to_struct[val2 - 1];
323 if (!tclass || tclass > policydb->p_classes.nprim) {
327 tclass_datum = policydb->class_val_to_struct[tclass - 1];
345 sattr = &policydb->type_attr_map[scontext->type - 1];
346 tattr = &policydb->type_attr_map[tcontext->type - 1];
356 avtab_search_node(&policydb->te_avtab, &avkey);
370 cond_compute_av(&policydb->te_cond_avtab, &avkey, avd);
408 for (ra = policydb->role_allow; ra; ra = ra->next) {
437 if (!tclass || tclass > policydb->p_classes.nprim) {
441 tclass_datum = policydb->class_val_to_struct[tclass - 1];
533 rc = context_to_string(NULL, policydb, context, scontext, scontext_len);
550 if (context_from_string(NULL, policydb, &context,
586 context_to_string(NULL, policydb, scontext, &s, &slen);
587 context_to_string(NULL, policydb, tcontext, &t, &tlen);
588 context_to_string(NULL, policydb, newcontext, &n, &nlen);
591 n, s, t, policydb->p_class_val_to_name[tclass - 1]);
658 avdatum = avtab_search(&policydb->te_avtab, &avkey);
662 node = avtab_search_node(&policydb->te_cond_avtab, &avkey);
682 for (roletr = policydb->role_tr; roletr;
699 rc = mls_compute_sid(policydb, scontext, tcontext, tclass, specified,
705 if (!policydb_context_isvalid(policydb, &newcontext)) {
846 context_to_string(NULL, policydb, context, &s, &len);
926 context_to_string(NULL, policydb, &oldc, &s, &len);
1028 (policydb->p_classes.table, validate_class, &newpolicydb)) {
1043 args.oldp = policydb;
1047 /* Save the old policydb and SID table to free later. */
1048 memcpy(&oldpolicydb, policydb, sizeof *policydb);
1051 /* Install the new policydb and SID table. */
1052 memcpy(policydb, &newpolicydb, sizeof *policydb);
1055 /* Free the old policydb and SID table. */
1082 c = policydb->ocontexts[OCON_FS];
1125 c = policydb->ocontexts[OCON_PORT];
1164 c = policydb->ocontexts[OCON_NETIF];
1233 c = policydb->ocontexts[OCON_NODE];
1248 c = policydb->ocontexts[OCON_NODE6];
1308 user = (user_datum_t *) hashtab_search(policydb->p_users.table,
1326 role = policydb->role_val_to_struct[i];
1336 (fromcon, user, &usercon, policydb->mls))
1397 for (genfs = policydb->genfs; genfs; genfs = genfs->next) {
1440 c = policydb->ocontexts[OCON_FSUSE];