|
Chris PeBenito |
0fbfa5 |
#DESC VMWare - Virtual machine
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Domains,types and permissions for running VMWare (the program) and for
|
|
Chris PeBenito |
0fbfa5 |
# running a SELinux system in a VMWare session (the VMWare-tools).
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Based on work contributed by Mark Westerman (mark.westerman@westcam.com),
|
|
Chris PeBenito |
0fbfa5 |
# modifications by NAI Labs.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Domain is for the VMWare admin programs and daemons.
|
|
Chris PeBenito |
0fbfa5 |
# X-Debian-Packages:
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# NOTE: The user vmware domain is provided separately in
|
|
Chris PeBenito |
0fbfa5 |
# macros/program/vmware_macros.te
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Next two domains are create by the daemon_domain() macro.
|
|
Chris PeBenito |
0fbfa5 |
# The vmware_t domain is for running VMWare daemons
|
|
Chris PeBenito |
0fbfa5 |
# The vmware_exec_t type is for the VMWare daemon and admin programs.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# quick hack making it privhome, should have a domain for each user in a macro
|
|
Chris PeBenito |
0fbfa5 |
daemon_domain(vmware, `, privhome')
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# The vmware_user_exec_t type is for the user programs.
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
type vmware_user_exec_t, file_type, sysadmfile, exec_type;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Type for vmware devices.
|
|
Chris PeBenito |
0fbfa5 |
type vmware_device_t, device_type, dev_fs;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# The sys configuration used for the /etc/vmware configuration files
|
|
Chris PeBenito |
0fbfa5 |
type vmware_sys_conf_t, file_type, sysadmfile;
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#########################################################################
|
|
Chris PeBenito |
0fbfa5 |
# Additional rules to start/stop VMWare
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Give init access to VMWare configuration files
|
|
Chris PeBenito |
0fbfa5 |
allow initrc_t vmware_sys_conf_t:file { ioctl read append };
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# Rules added to kernel_t domain for VMWare to start up
|
|
Chris PeBenito |
0fbfa5 |
#
|
|
Chris PeBenito |
0fbfa5 |
# VMWare need access to pcmcia devices for network
|
|
Chris PeBenito |
0fbfa5 |
ifdef(`cardmgr.te', `
|
|
Chris PeBenito |
0fbfa5 |
allow kernel_t cardmgr_var_lib_t:dir { getattr search };
|
|
Chris PeBenito |
0fbfa5 |
allow kernel_t cardmgr_var_lib_t:file { getattr ioctl read };
|
|
Chris PeBenito |
0fbfa5 |
')
|
|
Chris PeBenito |
0fbfa5 |
|
|
Chris PeBenito |
0fbfa5 |
# Vmware create network devices
|
|
Chris PeBenito |
0fbfa5 |
allow kernel_t self:capability net_admin;
|
|
Chris PeBenito |
0fbfa5 |
allow kernel_t self:netlink_route_socket { bind create getattr nlmsg_read nlmsg_write read write };
|
|
Chris PeBenito |
0fbfa5 |
allow kernel_t self:socket create;
|