Lines Matching refs:policydb
93 static PyObject* get_sens(const char *name, const apol_policy_t * policydb) in get_sens() argument
105 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_sens()
110 if (apol_level_query_set_sens(policydb, query, name)) in get_sens()
112 if (apol_level_get_by_query(policydb, query, &v)) in get_sens()
121 ap_mls_lvl = (apol_mls_level_t *) apol_mls_level_create_from_qpol_level_datum(policydb, level); in get_sens()
122 tmp = apol_mls_level_render(policydb, ap_mls_lvl); in get_sens()
164 apol_policy_t *policydb = NULL; in qpol_cat_datum_compare() local
168 policydb = (apol_policy_t *) data; in qpol_cat_datum_compare()
169 q = apol_policy_get_qpol(policydb); in qpol_cat_datum_compare()
170 assert(policydb); in qpol_cat_datum_compare()
204 apol_policy_t *policydb = NULL; in qpol_level_datum_compare() local
208 policydb = (apol_policy_t *) data; in qpol_level_datum_compare()
209 assert(policydb); in qpol_level_datum_compare()
210 q = apol_policy_get_qpol(policydb); in qpol_level_datum_compare()
236 static PyObject* get_cat_sens(const qpol_cat_t * cat_datum, const apol_policy_t * policydb) in get_cat_sens() argument
242 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_cat_sens()
248 if (!cat_datum || !policydb) in get_cat_sens()
258 if (apol_level_query_set_cat(policydb, query, cat_name)) in get_cat_sens()
260 if (apol_level_get_by_query(policydb, query, &v)) in get_cat_sens()
262 apol_vector_sort(v, &qpol_level_datum_compare, (void *)policydb); in get_cat_sens()
309 static PyObject* get_cats(const char *name, const apol_policy_t * policydb) in get_cats() argument
324 if (apol_cat_query_set_cat(policydb, query, name)) in get_cats()
326 if (apol_cat_get_by_query(policydb, query, &v)) in get_cats()
329 apol_vector_sort(v, &qpol_cat_datum_compare, (void *)policydb); in get_cats()
335 obj = get_cat_sens(cat_datum, policydb); in get_cats()
366 static PyObject* get_type_aliases(const qpol_type_t * type_datum, const apol_policy_t * policydb) in get_type_aliases() argument
374 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_type_aliases()
417 static PyObject* get_attr(const qpol_type_t * type_datum, const apol_policy_t * policydb) in get_attr() argument
423 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_attr()
487 static PyObject* get_attribs(const char *name, const apol_policy_t * policydb) in get_attribs() argument
504 if (apol_attr_query_set_attr(policydb, attr_query, name)) in get_attribs()
506 if (apol_attr_get_by_query(policydb, attr_query, &v)) in get_attribs()
516 obj = get_attr(type_datum, policydb); in get_attribs()
524 if (apol_attr_get_by_query(policydb, attr_query, &v)) in get_attribs()
534 obj = get_attr(type_datum, policydb); in get_attribs()
562 static PyObject* get_type_attrs(const qpol_type_t * type_datum, const apol_policy_t * policydb) in get_type_attrs() argument
567 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_type_attrs()
596 static PyObject* get_type(const qpol_type_t * type_datum, const apol_policy_t * policydb) { in get_type() argument
599 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_type()
623 obj = get_type_attrs(type_datum, policydb); in get_type()
629 obj = get_type_aliases(type_datum, policydb); in get_type()
657 static PyObject* get_booleans(const char *name, const apol_policy_t * policydb) in get_booleans() argument
666 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_booleans()
733 static PyObject* get_user(const qpol_user_t * user_datum, const apol_policy_t * policydb) in get_user() argument
743 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_user()
762 ap_lvl = apol_mls_level_create_from_qpol_mls_level(policydb, dflt_level); in get_user()
763 tmp = apol_mls_level_render(policydb, ap_lvl); in get_user()
771 ap_range = apol_mls_range_create_from_qpol_mls_range(policydb, range); in get_user()
772 tmp = apol_mls_range_render(policydb, ap_range); in get_user()
817 static PyObject* get_class(const qpol_class_t * class_datum, const apol_policy_t * policydb) in get_class() argument
822 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_class()
895 static PyObject* get_classes(const char *name, const apol_policy_t * policydb) in get_classes() argument
900 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_classes()
910 obj = get_class(class_datum, policydb); in get_classes()
923 obj = get_class(class_datum, policydb); in get_classes()
955 static PyObject* get_users(const char *name, const apol_policy_t * policydb) in get_users() argument
959 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_users()
971 obj = get_user(user_datum, policydb); in get_users()
982 obj = get_user(user_datum, policydb); in get_users()
1010 static PyObject* get_role(const qpol_role_t * role_datum, const apol_policy_t * policydb) in get_role() argument
1016 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_role()
1095 static PyObject* get_ports(const char *num, const apol_policy_t * policydb) in get_ports() argument
1101 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_ports()
1145 if ((c = apol_context_create_from_qpol_context(policydb, ctxt)) == NULL) { in get_ports()
1160 range_str = apol_mls_range_render(policydb, range); in get_ports()
1209 static PyObject* get_roles(const char *name, const apol_policy_t * policydb) in get_roles() argument
1213 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_roles()
1225 obj = get_role(role_datum, policydb); in get_roles()
1236 obj = get_role(role_datum, policydb); in get_roles()
1268 static PyObject* get_types(const char *name, const apol_policy_t * policydb) in get_types() argument
1272 qpol_policy_t *q = apol_policy_get_qpol(policydb); in get_types()
1284 obj = get_type(type_datum, policydb); in get_types()
1295 obj = get_type(type_datum, policydb); in get_types()