Lines Matching refs:pol
170 static policy_info pol = { variable
392 if (!pol.policy_file) { in validate_selinux_type()
396 if(!check_type(pol.db, value)) { in validate_selinux_type()
410 if (!pol.policy_file) { in validate_selinux_level()
414 int ret = sepol_mls_check(pol.handle, pol.db, value); in validate_selinux_level()
884 if (pol.policy_file_name) { in init()
885 log_info("Opening policy file: %s\n", pol.policy_file_name); in init()
886 pol.policy_file = fopen(pol.policy_file_name, "rb"); in init()
887 if (!pol.policy_file) { in init()
889 pol.policy_file_name, strerror(errno)); in init()
893 pol.handle = sepol_handle_create(); in init()
894 if (!pol.handle) { in init()
900 if (sepol_policy_file_create(&pol.pf) < 0) { in init()
906 sepol_policy_file_set_fp(pol.pf, pol.policy_file); in init()
907 sepol_policy_file_set_handle(pol.pf, pol.handle); in init()
909 if (sepol_policydb_create(&pol.db) < 0) { in init()
915 if (sepol_policydb_read(pol.db, pol.pf) < 0) { in init()
927 (pol.policy_file_name == NULL) ? "None" : pol.policy_file_name); in init()
958 pol.policy_file_name = optarg; in handle_options()
1239 if (pol.policy_file) { in cleanup()
1241 log_info("Closing file: %s\n", pol.policy_file_name); in cleanup()
1242 fclose(pol.policy_file); in cleanup()
1244 if (pol.db) in cleanup()
1245 sepol_policydb_free(pol.db); in cleanup()
1247 if (pol.pf) in cleanup()
1248 sepol_policy_file_free(pol.pf); in cleanup()
1250 if (pol.handle) in cleanup()
1251 sepol_handle_destroy(pol.handle); in cleanup()