Lines Matching refs:pol
147 static policy_info pol = { variable
281 if (!pol.policy_file) { in key_map_validate()
286 if(!check_type(pol.db, value)) { in key_map_validate()
295 ret = sepol_mls_check(pol.handle, pol.db, value); in key_map_validate()
633 if (pol.policy_file_name) { in init()
635 log_info("Opening policy file: %s\n", pol.policy_file_name); in init()
636 pol.policy_file = fopen(pol.policy_file_name, "rb"); in init()
637 if (!pol.policy_file) { in init()
639 pol.policy_file_name, strerror(errno)); in init()
643 pol.handle = sepol_handle_create(); in init()
644 if (!pol.handle) { in init()
650 if (sepol_policy_file_create(&pol.pf) < 0) { in init()
656 sepol_policy_file_set_fp(pol.pf, pol.policy_file); in init()
657 sepol_policy_file_set_handle(pol.pf, pol.handle); in init()
659 if (sepol_policydb_create(&pol.db) < 0) { in init()
665 if (sepol_policydb_read(pol.db, pol.pf) < 0) { in init()
672 …log_info("Policy file set to: %s\n", (pol.policy_file_name == NULL) ? "None" : pol.policy_file_nam… in init()
704 pol.policy_file_name = optarg; in handle_options()
971 if (pol.policy_file) { in cleanup()
973 log_info("Closing file: %s\n", pol.policy_file_name); in cleanup()
974 fclose(pol.policy_file); in cleanup()
976 if (pol.db) in cleanup()
977 sepol_policydb_free(pol.db); in cleanup()
979 if (pol.pf) in cleanup()
980 sepol_policy_file_free(pol.pf); in cleanup()
982 if (pol.handle) in cleanup()
983 sepol_handle_destroy(pol.handle); in cleanup()