|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
policy_module(ethereal, 2.0.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
type ethereal_t;
|
|
Chris PeBenito |
17de1b |
type ethereal_exec_t;
|
|
Chris PeBenito |
296273 |
typealias ethereal_t alias { user_ethereal_t staff_ethereal_t sysadm_ethereal_t };
|
|
Chris PeBenito |
296273 |
typealias ethereal_t alias { auditadm_ethereal_t secadm_ethereal_t };
|
|
Chris PeBenito |
296273 |
application_domain(ethereal_t, ethereal_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ethereal_home_t;
|
|
Chris PeBenito |
296273 |
typealias ethereal_home_t alias { user_ethereal_home_t staff_ethereal_home_t sysadm_ethereal_home_t };
|
|
Chris PeBenito |
296273 |
typealias ethereal_home_t alias { auditadm_ethereal_home_t secadm_ethereal_home_t };
|
|
Chris PeBenito |
296273 |
files_poly_member(ethereal_home_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_content(ethereal_home_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ethereal_tmp_t;
|
|
Chris PeBenito |
296273 |
typealias ethereal_tmp_t alias { user_ethereal_tmp_t staff_ethereal_tmp_t sysadm_ethereal_tmp_t };
|
|
Chris PeBenito |
296273 |
typealias ethereal_tmp_t alias { auditadm_ethereal_tmp_t secadm_ethereal_tmp_t };
|
|
Chris PeBenito |
296273 |
files_tmp_file(ethereal_tmp_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ethereal_tmp_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ethereal_tmpfs_t;
|
|
Chris PeBenito |
296273 |
typealias ethereal_tmpfs_t alias { user_ethereal_tmpfs_t staff_ethereal_tmpfs_t sysadm_ethereal_tmpfs_t };
|
|
Chris PeBenito |
296273 |
typealias ethereal_tmpfs_t alias { auditadm_ethereal_tmpfs_t secadm_ethereal_tmpfs_t };
|
|
Chris PeBenito |
296273 |
files_tmpfs_file(ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ethereal_tmpfs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type tethereal_t;
|
|
Chris PeBenito |
17de1b |
type tethereal_exec_t;
|
|
Chris PeBenito |
0bfccd |
application_domain(tethereal_t, tethereal_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type tethereal_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(tethereal_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
##############################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# Local Policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:capability { net_admin net_raw setgid };
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:process { signal getsched };
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:fifo_file { getattr read write };
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:shm destroy;
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:shm create_shm_perms;
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:netlink_route_socket { nlmsg_read create_socket_perms };
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:packet_socket { setopt bind ioctl getopt create read };
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow ethereal_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Re-execute itself (why?)
|
|
Chris PeBenito |
296273 |
can_exec(ethereal_t, ethereal_exec_t)
|
|
Chris PeBenito |
296273 |
corecmd_search_bin(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# /home/.ethereal
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans(ethereal_t, ethereal_home_t, dir)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Store temporary files
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(ethereal_t, ethereal_tmp_t, ethereal_tmp_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(ethereal_t, ethereal_tmp_t, ethereal_tmp_t)
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans(ethereal_t, ethereal_tmp_t, { dir file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
fs_tmpfs_filetrans(ethereal_t, ethereal_tmpfs_t, { dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
kernel_read_kernel_sysctls(ethereal_t)
|
|
Chris PeBenito |
296273 |
kernel_read_system_state(ethereal_t)
|
|
Chris PeBenito |
296273 |
kernel_read_sysctl(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corecmd_search_bin(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corenet_tcp_connect_generic_port(ethereal_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_generic_if(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dev_read_urand(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
files_read_usr_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
fs_list_inotifyfs(ethereal_t)
|
|
Chris PeBenito |
296273 |
fs_search_auto_mountpoints(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
libs_read_lib_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_fonts(ethereal_t)
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
seutil_use_newrole_fds(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
sysnet_read_config(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
userdom_manage_user_home_content_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(ethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_dirs(ethereal_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_symlinks(ethereal_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_dirs(ethereal_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_files(ethereal_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_symlinks(ethereal_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
nscd_socket_use(ethereal_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Manual transition from userhelper
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
userhelper_use_fd(ethereal_t)
|
|
Chris PeBenito |
296273 |
userhelper_sigchld(ethereal_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
xserver_user_x_domain_template(ethereal, ethereal_t, ethereal_tmpfs_t)
|
|
Chris PeBenito |
296273 |
xserver_create_xdm_tmp_sockets(ethereal_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Tethereal policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow tethereal_t tethereal_t : capability { dac_override dac_read_search setgid setuid net_raw };
|
|
Chris PeBenito |
17de1b |
allow tethereal_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow tethereal_t self:netlink_route_socket create_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow tethereal_t self:packet_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow tethereal_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow tethereal_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Store temporary files
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(tethereal_t, tethereal_tmp_t, tethereal_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(tethereal_t, tethereal_tmp_t, tethereal_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(tethereal_t, tethereal_tmp_t, { dir file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /proc
|
|
Chris PeBenito |
17de1b |
kernel_read_all_sysctls(tethereal_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(tethereal_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Read ethereal files in /usr
|
|
Chris PeBenito |
17de1b |
files_read_usr_files(tethereal_t)
|
|
Chris PeBenito |
17de1b |
# /etc/nsswitch.conf
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(tethereal_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(tethereal_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
seutil_use_newrole_fds(tethereal_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
sysnet_dns_name_resolve(tethereal_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(tethereal_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nscd_socket_use(tethereal_t)
|
|
Chris PeBenito |
17de1b |
')
|