Chris PeBenito a6a638
Chris PeBenito a6a638
policy_module(vmware,1.0.0)
Chris PeBenito a6a638
Chris PeBenito a6a638
########################################
Chris PeBenito a6a638
#
Chris PeBenito a6a638
# Declarations
Chris PeBenito a6a638
#
Chris PeBenito a6a638
Chris PeBenito a6a638
# VMWare user program
Chris PeBenito a6a638
type vmware_exec_t;
Chris PeBenito a6a638
corecmd_executable_file(vmware_exec_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
# VMWare host programs
Chris PeBenito a6a638
type vmware_host_t;
Chris PeBenito a6a638
type vmware_host_exec_t;
Chris PeBenito a6a638
init_daemon_domain(vmware_host_t,vmware_host_exec_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
# Systemwide configuration files
Chris PeBenito a6a638
type vmware_sys_conf_t;
Chris PeBenito a6a638
files_type(vmware_sys_conf_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
type vmware_var_run_t;
Chris PeBenito a6a638
files_pid_file(vmware_var_run_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
########################################
Chris PeBenito a6a638
#
Chris PeBenito a6a638
# VMWare host local policy
Chris PeBenito a6a638
#
Chris PeBenito a6a638
Chris PeBenito 5b7b2b
allow vmware_host_t self:capability { setuid net_raw };
Chris PeBenito a6a638
dontaudit vmware_host_t self:capability sys_tty_config;
Chris PeBenito a6a638
allow vmware_host_t self:process signal_perms;
Chris PeBenito 5b7b2b
allow vmware_host_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 5b7b2b
allow vmware_host_t self:rawip_socket create_socket_perms;
Chris PeBenito a6a638
Chris PeBenito 5b7b2b
# cjp: the ro and rw files should be split up
Chris PeBenito 5b7b2b
allow vmware_host_t vmware_sys_conf_t:dir rw_dir_perms;
Chris PeBenito 5b7b2b
allow vmware_host_t vmware_sys_conf_t:file manage_file_perms;
Chris PeBenito 5b7b2b
Chris PeBenito 5b7b2b
allow vmware_host_t vmware_var_run_t:file manage_file_perms;
Chris PeBenito 5b7b2b
allow vmware_host_t vmware_var_run_t:sock_file manage_file_perms;
Chris PeBenito a6a638
allow vmware_host_t vmware_var_run_t:dir rw_dir_perms;
Chris PeBenito 5b7b2b
files_pid_filetrans(vmware_host_t,vmware_var_run_t,{ file sock_file })
Chris PeBenito a6a638
Chris PeBenito a6a638
kernel_read_kernel_sysctls(vmware_host_t)
Chris PeBenito a6a638
kernel_list_proc(vmware_host_t)
Chris PeBenito a6a638
kernel_read_proc_symlinks(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito 5b7b2b
corenet_non_ipsec_sendrecv(vmware_host_t)
Chris PeBenito 5b7b2b
corenet_raw_sendrecv_generic_if(vmware_host_t)
Chris PeBenito 5b7b2b
corenet_raw_sendrecv_all_nodes(vmware_host_t)
Chris PeBenito 5b7b2b
corenet_raw_bind_all_nodes(vmware_host_t)
Chris PeBenito 5b7b2b
Chris PeBenito a6a638
dev_read_sysfs(vmware_host_t)
Chris PeBenito 5b7b2b
dev_rw_vmware(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
domain_use_interactive_fds(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito 5b7b2b
files_read_etc_files(vmware_host_t)
Chris PeBenito 5b7b2b
Chris PeBenito a6a638
fs_getattr_all_fs(vmware_host_t)
Chris PeBenito a6a638
fs_search_auto_mountpoints(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
term_dontaudit_use_console(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
init_use_fds(vmware_host_t)
Chris PeBenito a6a638
init_use_script_ptys(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
libs_use_ld_so(vmware_host_t)
Chris PeBenito a6a638
libs_use_shared_libs(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
logging_send_syslog_msg(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
miscfiles_read_localization(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
userdom_dontaudit_use_unpriv_user_fds(vmware_host_t)
Chris PeBenito a6a638
userdom_dontaudit_search_sysadm_home_dirs(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
ifdef(`targeted_policy',`
Chris PeBenito a6a638
	term_dontaudit_use_unallocated_ttys(vmware_host_t)
Chris PeBenito a6a638
	term_dontaudit_use_generic_ptys(vmware_host_t)
Chris PeBenito a6a638
	files_dontaudit_read_root_files(vmware_host_t)
Chris PeBenito a6a638
')
Chris PeBenito a6a638
Chris PeBenito a6a638
optional_policy(`
Chris PeBenito a6a638
	seutil_sigchld_newrole(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
')
Chris PeBenito a6a638
Chris PeBenito a6a638
optional_policy(`
Chris PeBenito a6a638
	udev_read_db(vmware_host_t)
Chris PeBenito a6a638
')
Chris PeBenito 5b7b2b
netutils_domtrans_ping(vmware_host_t)
Chris PeBenito a6a638
Chris PeBenito a6a638
ifdef(`TODO',`
Chris PeBenito a6a638
# VMWare need access to pcmcia devices for network
Chris PeBenito a6a638
optional_policy(`
Chris PeBenito a6a638
allow kernel_t cardmgr_var_lib_t:dir { getattr search };
Chris PeBenito a6a638
allow kernel_t cardmgr_var_lib_t:file { getattr ioctl read };
Chris PeBenito a6a638
')
Chris PeBenito a6a638
# Vmware create network devices
Chris PeBenito a6a638
allow kernel_t self:capability net_admin;
Chris PeBenito a6a638
allow kernel_t self:netlink_route_socket { bind create getattr nlmsg_read nlmsg_write read write };
Chris PeBenito a6a638
allow kernel_t self:socket create;
Chris PeBenito a6a638
')