Chris PeBenito 17de1b
Chris PeBenito c12621
policy_module(uml, 2.0.1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 296273
type uml_t;
Chris PeBenito 17de1b
type uml_exec_t;
Chris PeBenito 296273
typealias uml_t alias { user_uml_t staff_uml_t sysadm_uml_t };
Chris PeBenito 296273
typealias uml_t alias { auditadm_uml_t secadm_uml_t };
Chris PeBenito 296273
application_domain(uml_t, uml_exec_t)
Chris PeBenito 296273
ubac_constrained(uml_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type uml_ro_t;
Chris PeBenito 296273
typealias uml_ro_t alias { user_uml_ro_t staff_uml_ro_t sysadm_uml_ro_t };
Chris PeBenito 296273
typealias uml_ro_t alias { auditadm_uml_ro_t secadm_uml_ro_t };
Chris PeBenito 17de1b
files_type(uml_ro_t)
Chris PeBenito 296273
ubac_constrained(uml_ro_t)
Chris PeBenito 296273
Chris PeBenito 296273
type uml_rw_t;
Chris PeBenito 296273
typealias uml_rw_t alias { user_uml_rw_t staff_uml_rw_t sysadm_uml_rw_t };
Chris PeBenito 296273
typealias uml_rw_t alias { auditadm_uml_rw_t secadm_uml_rw_t };
Chris PeBenito 296273
files_type(uml_rw_t)
Chris PeBenito 296273
ubac_constrained(uml_rw_t)
Chris PeBenito 296273
Chris PeBenito 296273
type uml_tmp_t;
Chris PeBenito 296273
typealias uml_tmp_t alias { user_uml_tmp_t staff_uml_tmp_t sysadm_uml_tmp_t };
Chris PeBenito 296273
typealias uml_tmp_t alias { auditadm_uml_tmp_t secadm_uml_tmp_t };
Chris PeBenito 296273
files_tmp_file(uml_tmp_t)
Chris PeBenito 296273
ubac_constrained(uml_tmp_t)
Chris PeBenito 296273
Chris PeBenito 296273
type uml_tmpfs_t;
Chris PeBenito 296273
typealias uml_tmpfs_t alias { user_uml_tmpfs_t staff_uml_tmpfs_t sysadm_uml_tmpfs_t };
Chris PeBenito 296273
typealias uml_tmpfs_t alias { auditadm_uml_tmpfs_t secadm_uml_tmpfs_t };
Chris PeBenito 296273
files_tmpfs_file(uml_tmpfs_t)
Chris PeBenito 296273
ubac_constrained(uml_tmpfs_t)
Chris PeBenito 296273
Chris PeBenito 296273
type uml_devpts_t;
Chris PeBenito 296273
typealias uml_devpts_t alias { user_uml_devpts_t staff_uml_devpts_t sysadm_uml_devpts_t };
Chris PeBenito 296273
typealias uml_devpts_t alias { auditadm_uml_devpts_t secadm_uml_devpts_t };
Chris PeBenito 296273
term_pty(uml_devpts_t)
Chris PeBenito 296273
ubac_constrained(uml_devpts_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type uml_switch_t;
Chris PeBenito 17de1b
type uml_switch_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(uml_switch_t, uml_switch_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type uml_switch_var_run_t;
Chris PeBenito 17de1b
files_pid_file(uml_switch_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 296273
allow uml_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 296273
allow uml_t self:process { signal_perms ptrace };
Chris PeBenito 296273
allow uml_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 296273
allow uml_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 296273
# Use the network.
Chris PeBenito 296273
allow uml_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 296273
allow uml_t self:udp_socket create_socket_perms;
Chris PeBenito 296273
# for mconsole
Chris PeBenito 296273
allow uml_t self:unix_dgram_socket sendto;
Chris PeBenito 296273
Chris PeBenito 296273
# allow the UML thing to happen
Chris PeBenito 296273
allow uml_t uml_devpts_t:chr_file { rw_file_perms setattr };
Chris PeBenito 296273
term_create_pty(uml_t, uml_devpts_t)
Chris PeBenito 296273
Chris PeBenito 296273
manage_dirs_pattern(uml_t, uml_tmp_t, uml_tmp_t)
Chris PeBenito 296273
manage_files_pattern(uml_t, uml_tmp_t, uml_tmp_t)
Chris PeBenito 296273
files_tmp_filetrans(uml_t, uml_tmp_t, { file dir })
Chris PeBenito 296273
can_exec(uml_t, uml_tmp_t)
Chris PeBenito 296273
Chris PeBenito 296273
manage_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
Chris PeBenito 296273
manage_lnk_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
Chris PeBenito 296273
manage_fifo_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
Chris PeBenito 296273
manage_sock_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
Chris PeBenito 296273
fs_tmpfs_filetrans(uml_t, uml_tmpfs_t, { file lnk_file sock_file fifo_file })
Chris PeBenito 296273
can_exec(uml_t, uml_tmpfs_t)
Chris PeBenito 296273
Chris PeBenito 296273
# access config files
Chris PeBenito 296273
allow uml_t { uml_ro_t uml_ro_t }:dir list_dir_perms;
Chris PeBenito 296273
read_files_pattern(uml_t, { uml_ro_t uml_ro_t }, { uml_ro_t uml_ro_t })
Chris PeBenito 296273
read_lnk_files_pattern(uml_t, { uml_ro_t uml_ro_t }, { uml_ro_t uml_ro_t })
Chris PeBenito 296273
Chris PeBenito 296273
manage_dirs_pattern(uml_t, uml_rw_t, uml_rw_t)
Chris PeBenito 296273
manage_files_pattern(uml_t, uml_rw_t, uml_rw_t)
Chris PeBenito 296273
manage_lnk_files_pattern(uml_t, uml_rw_t, uml_rw_t)
Chris PeBenito 296273
manage_fifo_files_pattern(uml_t, uml_rw_t, uml_rw_t)
Chris PeBenito 296273
manage_sock_files_pattern(uml_t, uml_rw_t, uml_rw_t)
Chris PeBenito 296273
userdom_user_home_dir_filetrans(uml_t, uml_rw_t, { file lnk_file sock_file fifo_file })
Chris PeBenito 296273
Chris PeBenito 296273
can_exec(uml_t, { uml_exec_t uml_exec_t })
Chris PeBenito 296273
Chris PeBenito 296273
kernel_read_system_state(uml_t)
Chris PeBenito 296273
# for SKAS - need something better
Chris PeBenito 296273
kernel_write_proc_files(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
# for xterm
Chris PeBenito 296273
corecmd_exec_bin(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
corenet_all_recvfrom_unlabeled(uml_t)
Chris PeBenito 296273
corenet_all_recvfrom_netlabel(uml_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_generic_if(uml_t)
Chris PeBenito 296273
corenet_udp_sendrecv_generic_if(uml_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(uml_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(uml_t)
Chris PeBenito 296273
corenet_tcp_sendrecv_all_ports(uml_t)
Chris PeBenito 296273
corenet_udp_sendrecv_all_ports(uml_t)
Chris PeBenito 296273
corenet_tcp_connect_all_ports(uml_t)
Chris PeBenito 296273
corenet_sendrecv_all_client_packets(uml_t)
Chris PeBenito 296273
corenet_rw_tun_tap_dev(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
domain_use_interactive_fds(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
# for xterm
Chris PeBenito 296273
files_read_etc_files(uml_t)
Chris PeBenito 296273
files_dontaudit_read_etc_runtime_files(uml_t)
Chris PeBenito 296273
# putting uml data under /var is usual...
Chris PeBenito 296273
files_search_var(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
fs_getattr_xattr_fs(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
init_read_utmp(uml_t)
Chris PeBenito 296273
init_dontaudit_write_utmp(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
# for xterm
Chris PeBenito 296273
libs_exec_lib_files(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
# Inherit and use descriptors from newrole.
Chris PeBenito 296273
seutil_use_newrole_fds(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
# Use the network.
Chris PeBenito 296273
sysnet_read_config(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
userdom_use_user_terminals(uml_t)
Chris PeBenito 296273
Chris PeBenito 296273
optional_policy(`
Chris PeBenito 296273
	nis_use_ypbind(uml_t)
Chris PeBenito 296273
')
Chris PeBenito 296273
Chris PeBenito 296273
########################################
Chris PeBenito 296273
#
Chris PeBenito 296273
# Local policy
Chris PeBenito 296273
#
Chris PeBenito 296273
Chris PeBenito 17de1b
dontaudit uml_switch_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow uml_switch_t self:process signal_perms;
Chris PeBenito 17de1b
allow uml_switch_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow uml_switch_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(uml_switch_t, uml_switch_var_run_t, uml_switch_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(uml_switch_t, uml_switch_var_run_t, uml_switch_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(uml_switch_t, uml_switch_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(uml_switch_t)
Chris PeBenito 17de1b
kernel_list_proc(uml_switch_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(uml_switch_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_use_console(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
init_use_fds(uml_switch_t)
Chris PeBenito 17de1b
init_use_script_ptys(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(uml_switch_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(uml_switch_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(uml_switch_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(uml_switch_t)
Chris PeBenito 17de1b
')