普通文本  |  23行  |  236 B

module modreq_bool_opt 1.0;

require { 
	class file {read write};
	
}

type mod_global_t;

optional {
	require {
		bool bool_req;
	}
	
	type a_t;
	type b_t;
	type mod_opt_t;

	if (bool_req) {
		allow a_t b_t : file { read write };
	}
}