Lines Matching refs:pol
172 static policy_info pol = { variable
407 if (!pol.policy_file) { in validate_domain()
411 if (!find_type(pol.db, value, TYPE_TYPE)) { in validate_domain()
427 if (!pol.policy_file) { in validate_type()
431 type_datum_t *type_dat = find_type(pol.db, value, TYPE_TYPE); in validate_type()
437 type_datum_t *attrib_dat = find_type(pol.db, APP_DATA_REQUIRED_ATTRIB, in validate_type()
444 if (!type_has_attribute(pol.db, type_dat, attrib_dat)) { in validate_type()
460 if (!pol.policy_file) { in validate_selinux_level()
464 int ret = sepol_mls_check(pol.handle, pol.db, value); in validate_selinux_level()
934 if (pol.policy_file_name) { in init()
935 log_info("Opening policy file: %s\n", pol.policy_file_name); in init()
936 pol.policy_file = fopen(pol.policy_file_name, "rb"); in init()
937 if (!pol.policy_file) { in init()
939 pol.policy_file_name, strerror(errno)); in init()
943 pol.handle = sepol_handle_create(); in init()
944 if (!pol.handle) { in init()
950 if (sepol_policy_file_create(&pol.pf) < 0) { in init()
956 sepol_policy_file_set_fp(pol.pf, pol.policy_file); in init()
957 sepol_policy_file_set_handle(pol.pf, pol.handle); in init()
959 if (sepol_policydb_create(&pol.db) < 0) { in init()
965 if (sepol_policydb_read(pol.db, pol.pf) < 0) { in init()
977 (pol.policy_file_name == NULL) ? "None" : pol.policy_file_name); in init()
1008 pol.policy_file_name = optarg; in handle_options()
1289 if (pol.policy_file) { in cleanup()
1291 log_info("Closing file: %s\n", pol.policy_file_name); in cleanup()
1292 fclose(pol.policy_file); in cleanup()
1294 if (pol.db) in cleanup()
1295 sepol_policydb_free(pol.db); in cleanup()
1297 if (pol.pf) in cleanup()
1298 sepol_policy_file_free(pol.pf); in cleanup()
1300 if (pol.handle) in cleanup()
1301 sepol_handle_destroy(pol.handle); in cleanup()