@@ -172,34 +172,13 @@ gen_tunable(virt_sandbox_use_mknod, false)
172172# # </desc>
173173gen_tunable(virt_sandbox_use_all_caps, true )
174174
175- # # <desc>
176- # # <p>
177- # # Allow qemu-ga to read qemu-ga date.
178- # # </p>
179- # # </desc>
180- gen_tunable(virt_read_qemu_ga_data, false )
181-
182- # # <desc>
183- # # <p>
184- # # Allow qemu-ga to manage qemu-ga date.
185- # # </p>
186- # # </desc>
187- gen_tunable(virt_rw_qemu_ga_data, false )
188-
189175# # <desc>
190176# # <p>
191177# # Allow virtlockd read and lock block devices.
192178# # </p>
193179# # </desc>
194180gen_tunable(virt_lockd_blk_devs, false )
195181
196- # # <desc>
197- # # <p>
198- # # Allow qemu-ga read all non-security file types.
199- # # </p>
200- # # </desc>
201- gen_tunable(virt_qemu_ga_read_nonsecurity_files, false )
202-
203182virt_domain_template(svirt)
204183role system_r types svirt_t;
205184typealias svirt_t alias qemu_t;
@@ -299,34 +278,6 @@ ifdef(`enable_mls',`
299278 init_ranged_daemon_domain(virtlogd_t, virtlogd_exec_t, s0 - mls_systemhigh)
300279')
301280
302-
303- type virt_bridgehelper_t, virt_system_domain;
304- domain_type(virt_bridgehelper_t)
305-
306- type virt_bridgehelper_exec_t, virt_file_type;
307- domain_entry_file(virt_bridgehelper_t, virt_bridgehelper_exec_t)
308- role system_r types virt_bridgehelper_t;
309-
310- # policy for qemu_ga
311- type virt_qemu_ga_t, virt_system_domain;
312- type virt_qemu_ga_exec_t, virt_file_type;
313- init_daemon_domain(virt_qemu_ga_t, virt_qemu_ga_exec_t)
314-
315- type virt_qemu_ga_var_run_t, virt_file_type;
316- files_pid_file(virt_qemu_ga_var_run_t)
317-
318- type virt_qemu_ga_log_t, virt_file_type;
319- logging_log_file(virt_qemu_ga_log_t)
320-
321- type virt_qemu_ga_tmp_t, virt_file_type;
322- files_tmp_file(virt_qemu_ga_tmp_t)
323-
324- type virt_qemu_ga_data_t, virt_file_type;
325- files_type(virt_qemu_ga_data_t)
326-
327- type virt_qemu_ga_unconfined_exec_t, virt_file_type;
328- application_executable_file(virt_qemu_ga_unconfined_exec_t)
329-
330281# virtinterfaced
331282virt_driver_template(virtinterfaced)
332283
@@ -1706,31 +1657,6 @@ tunable_policy(`virt_sandbox_use_audit',`
17061657
17071658userdom_use_user_ptys(svirt_qemu_net_t)
17081659
1709- # #######################################
1710- #
1711- # virt_bridgehelper local policy
1712- #
1713-
1714- allow virt_bridgehelper_t self:process { setcap getcap };
1715- allow virt_bridgehelper_t self:capability { setpcap setgid setuid net_admin };
1716- allow virt_bridgehelper_t self:tcp_socket create_stream_socket_perms;
1717- allow virt_bridgehelper_t self:tun_socket create_socket_perms;
1718- allow virt_bridgehelper_t self:unix_dgram_socket create_socket_perms;
1719-
1720- allow virt_bridgehelper_t virt_domain:unix_stream_socket { read write };
1721-
1722- manage_files_pattern(virt_bridgehelper_t, svirt_home_t, svirt_home_t)
1723-
1724- kernel_read_network_state(virt_bridgehelper_t)
1725- kernel_read_system_state(virt_bridgehelper_t)
1726-
1727- dev_read_urand(virt_bridgehelper_t)
1728- dev_read_rand(virt_bridgehelper_t)
1729- dev_read_sysfs(virt_bridgehelper_t)
1730-
1731- corenet_rw_tun_tap_dev(virt_bridgehelper_t)
1732-
1733- userdom_use_inherited_user_ptys(virt_bridgehelper_t)
17341660
17351661# ######################################
17361662#
@@ -1920,152 +1846,6 @@ allow virtvboxd_t self:netlink_route_socket { bind create getattr setopt };
19201846allow virtvboxd_t self:unix_dgram_socket create;
19211847allow virtvboxd_t virt_etc_t:dir search;
19221848
1923- # ######################################
1924- #
1925- # virt_qemu_ga local policy
1926- #
1927-
1928- allow virt_qemu_ga_t self:capability { sys_admin sys_time sys_tty_config };
1929-
1930- allow virt_qemu_ga_t self:passwd passwd;
1931-
1932- allow virt_qemu_ga_t self:fifo_file rw_fifo_file_perms;
1933- allow virt_qemu_ga_t self:unix_stream_socket create_stream_socket_perms;
1934-
1935- allow virt_qemu_ga_t virt_qemu_ga_exec_t:dir search_dir_perms;
1936- can_exec(virt_qemu_ga_t, virt_qemu_ga_exec_t)
1937-
1938- manage_dirs_pattern(virt_qemu_ga_t, virt_qemu_ga_tmp_t, virt_qemu_ga_tmp_t)
1939- manage_files_pattern(virt_qemu_ga_t, virt_qemu_ga_tmp_t, virt_qemu_ga_tmp_t)
1940- files_tmp_filetrans(virt_qemu_ga_t, virt_qemu_ga_tmp_t, { file dir })
1941-
1942- manage_files_pattern(virt_qemu_ga_t, virt_qemu_ga_var_run_t, virt_qemu_ga_var_run_t)
1943- manage_dirs_pattern(virt_qemu_ga_t, virt_qemu_ga_var_run_t, virt_qemu_ga_var_run_t)
1944- files_pid_filetrans(virt_qemu_ga_t, virt_qemu_ga_var_run_t, { dir file } )
1945-
1946- manage_dirs_pattern(virt_qemu_ga_t, virt_qemu_ga_log_t, virt_qemu_ga_log_t)
1947- manage_files_pattern(virt_qemu_ga_t, virt_qemu_ga_log_t, virt_qemu_ga_log_t)
1948- logging_log_filetrans(virt_qemu_ga_t, virt_qemu_ga_log_t, { dir file })
1949-
1950- kernel_read_system_state(virt_qemu_ga_t)
1951- kernel_read_network_state(virt_qemu_ga_t)
1952- kernel_rw_kernel_sysctl(virt_qemu_ga_t)
1953-
1954- corecmd_exec_shell(virt_qemu_ga_t)
1955- corecmd_exec_bin(virt_qemu_ga_t)
1956-
1957- clock_read_adjtime(virt_qemu_ga_t)
1958-
1959- dev_getattr_apm_bios_dev(virt_qemu_ga_t)
1960- dev_rw_sysfs(virt_qemu_ga_t)
1961- dev_rw_realtime_clock(virt_qemu_ga_t)
1962-
1963- files_list_all_mountpoints(virt_qemu_ga_t)
1964- files_write_all_mountpoints(virt_qemu_ga_t)
1965-
1966- fs_list_all(virt_qemu_ga_t)
1967- fs_getattr_all_fs(virt_qemu_ga_t)
1968-
1969- term_use_virtio_console(virt_qemu_ga_t)
1970- term_use_all_ttys(virt_qemu_ga_t)
1971- term_use_unallocated_ttys(virt_qemu_ga_t)
1972-
1973- auth_use_nsswitch(virt_qemu_ga_t)
1974-
1975- logging_send_syslog_msg(virt_qemu_ga_t)
1976- logging_send_audit_msgs(virt_qemu_ga_t)
1977-
1978- init_read_utmp(virt_qemu_ga_t)
1979-
1980- modutils_exec_kmod(virt_qemu_ga_t)
1981-
1982- sysnet_dns_name_resolve(virt_qemu_ga_t)
1983-
1984- systemd_exec_systemctl(virt_qemu_ga_t)
1985- systemd_start_power_services(virt_qemu_ga_t)
1986- systemd_dbus_chat_logind(virt_qemu_ga_t)
1987-
1988- userdom_use_user_ptys(virt_qemu_ga_t)
1989-
1990- usermanage_domtrans_passwd(virt_qemu_ga_t)
1991-
1992- tunable_policy(`virt_qemu_ga_read_nonsecurity_files',`
1993- files_read_non_security_files(virt_qemu_ga_t)
1994- ')
1995-
1996- tunable_policy(`virt_read_qemu_ga_data',`
1997- read_files_pattern(virt_qemu_ga_t, virt_qemu_ga_data_t, virt_qemu_ga_data_t)
1998- read_lnk_files_pattern(virt_qemu_ga_t, virt_qemu_ga_data_t, virt_qemu_ga_data_t)
1999- ')
2000-
2001- tunable_policy(`virt_rw_qemu_ga_data',`
2002- manage_files_pattern(virt_qemu_ga_t, virt_qemu_ga_data_t, virt_qemu_ga_data_t)
2003- manage_lnk_files_pattern(virt_qemu_ga_t, virt_qemu_ga_data_t, virt_qemu_ga_data_t)
2004- manage_dirs_pattern(virt_qemu_ga_t, virt_qemu_ga_data_t, virt_qemu_ga_data_t)
2005- ')
2006-
2007- optional_policy(`
2008- bootloader_domtrans(virt_qemu_ga_t)
2009- ')
2010-
2011- optional_policy(`
2012- clock_domtrans(virt_qemu_ga_t)
2013- ')
2014-
2015- optional_policy(`
2016- dbus_system_bus_client(virt_qemu_ga_t)
2017- ')
2018-
2019- optional_policy(`
2020- cron_initrc_domtrans(virt_qemu_ga_t)
2021- cron_domtrans(virt_qemu_ga_t)
2022- ')
2023-
2024- optional_policy(`
2025- devicekit_manage_pid_files(virt_qemu_ga_t)
2026- devicekit_read_log_files(virt_qemu_ga_t)
2027- ')
2028-
2029- optional_policy(`
2030- fstools_domtrans(virt_qemu_ga_t)
2031- ')
2032-
2033- optional_policy(`
2034- rpm_dbus_chat(virt_qemu_ga_t)
2035- ')
2036-
2037- optional_policy(`
2038- shutdown_domtrans(virt_qemu_ga_t)
2039- ')
2040-
2041- optional_policy(`
2042- udev_read_pid_files(virt_qemu_ga_t)
2043- ')
2044-
2045- # ######################################
2046- #
2047- # qemu-ga unconfined hook script local policy
2048- #
2049-
2050- optional_policy(`
2051- type virt_qemu_ga_unconfined_t;
2052- domain_type(virt_qemu_ga_unconfined_t)
2053-
2054- domain_entry_file(virt_qemu_ga_unconfined_t, virt_qemu_ga_unconfined_exec_t)
2055- role system_r types virt_qemu_ga_unconfined_t;
2056-
2057- domtrans_pattern(virt_qemu_ga_t, virt_qemu_ga_unconfined_exec_t, virt_qemu_ga_unconfined_t)
2058-
2059- allow virt_qemu_ga_t virt_qemu_ga_unconfined_exec_t:dir search_dir_perms;
2060- allow virt_qemu_ga_t virt_qemu_ga_unconfined_exec_t:dir read_file_perms;
2061- allow virt_qemu_ga_t virt_qemu_ga_unconfined_exec_t:file ioctl;
2062-
2063- init_domtrans_script(virt_qemu_ga_unconfined_t)
2064-
2065- optional_policy(`
2066- unconfined_domain(virt_qemu_ga_unconfined_t)
2067- ')
2068- ')
20691849
20701850# ######################################
20711851#
0 commit comments