Chris PeBenito 9401ae1
policy_module(amanda, 1.13.0)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
#######################################
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Declarations
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_t;
Chris PeBenito 9401ae1
type amanda_inetd_exec_t;
Chris PeBenito 9401ae1
inetd_service_domain(amanda_t, amanda_inetd_exec_t)
Chris PeBenito 9401ae1
role system_r types amanda_t;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_exec_t;
Chris PeBenito 9401ae1
domain_entry_file(amanda_t, amanda_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_log_t;
Chris PeBenito 9401ae1
logging_log_file(amanda_log_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_config_t;
Chris PeBenito 9401ae1
files_type(amanda_config_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_usr_lib_t;
Chris PeBenito 9401ae1
files_type(amanda_usr_lib_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_var_lib_t;
Chris PeBenito 9401ae1
files_type(amanda_var_lib_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_gnutarlists_t;
Chris PeBenito 9401ae1
files_type(amanda_gnutarlists_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_tmp_t;
Chris PeBenito 9401ae1
files_tmp_file(amanda_tmp_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_amandates_t;
Chris PeBenito 9401ae1
files_type(amanda_amandates_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_dumpdates_t;
Chris PeBenito 9401ae1
files_type(amanda_dumpdates_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_data_t;
Chris PeBenito 9401ae1
files_type(amanda_data_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_recover_t;
Chris PeBenito 9401ae1
type amanda_recover_exec_t;
Chris PeBenito 9401ae1
application_domain(amanda_recover_t, amanda_recover_exec_t)
Chris PeBenito 9401ae1
role system_r types amanda_recover_t;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
type amanda_recover_dir_t;
Chris PeBenito 9401ae1
files_type(amanda_recover_dir_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
optional_policy(`
Chris PeBenito 9401ae1
	prelink_object_file(amanda_usr_lib_t)
Chris PeBenito 9401ae1
')
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Amanda local policy
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_t self:capability { chown dac_override setuid kill };
Chris PeBenito 9401ae1
allow amanda_t self:process { setpgid signal };
Chris PeBenito 9401ae1
allow amanda_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 9401ae1
allow amanda_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 9401ae1
allow amanda_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 9401ae1
allow amanda_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 9401ae1
allow amanda_t self:udp_socket create_socket_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_t amanda_amandates_t:file rw_file_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_t amanda_config_t:file read_file_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_t, amanda_data_t, amanda_data_t)
Chris PeBenito 9401ae1
manage_files_pattern(amanda_t, amanda_data_t, amanda_data_t)
Chris PeBenito 9401ae1
filetrans_pattern(amanda_t, amanda_config_t, amanda_data_t, { file dir })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_t amanda_dumpdates_t:file rw_file_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
can_exec(amanda_t, amanda_exec_t)
Chris PeBenito 9401ae1
can_exec(amanda_t, amanda_inetd_exec_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_t amanda_gnutarlists_t:dir rw_dir_perms;
Chris PeBenito 9401ae1
allow amanda_t amanda_gnutarlists_t:file manage_file_perms;
Chris PeBenito 9401ae1
allow amanda_t amanda_gnutarlists_t:lnk_file manage_lnk_file_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_t, amanda_var_lib_t, amanda_var_lib_t)
Chris PeBenito 9401ae1
manage_files_pattern(amanda_t, amanda_var_lib_t, amanda_var_lib_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_files_pattern(amanda_t, amanda_log_t, amanda_log_t)
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_t, amanda_log_t, amanda_log_t)
Chris PeBenito 9401ae1
logging_log_filetrans(amanda_t, amanda_log_t, { file dir })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_files_pattern(amanda_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
files_tmp_filetrans(amanda_t, amanda_tmp_t, { file dir })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
kernel_read_system_state(amanda_t)
Chris PeBenito 9401ae1
kernel_read_kernel_sysctls(amanda_t)
Chris PeBenito 9401ae1
kernel_dontaudit_getattr_unlabeled_files(amanda_t)
Chris PeBenito 9401ae1
kernel_dontaudit_read_proc_symlinks(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
corecmd_exec_shell(amanda_t)
Chris PeBenito 9401ae1
corecmd_exec_bin(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
corenet_all_recvfrom_unlabeled(amanda_t)
Chris PeBenito 9401ae1
corenet_all_recvfrom_netlabel(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_if(amanda_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_generic_if(amanda_t)
Chris PeBenito 9401ae1
corenet_raw_sendrecv_generic_if(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_node(amanda_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_generic_node(amanda_t)
Chris PeBenito 9401ae1
corenet_raw_sendrecv_generic_node(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_all_ports(amanda_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_all_ports(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_generic_node(amanda_t)
Chris PeBenito 9401ae1
corenet_udp_bind_generic_node(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_all_rpc_ports(amanda_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_generic_port(amanda_t)
Chris PeBenito 9401ae1
corenet_dontaudit_tcp_bind_all_ports(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
dev_getattr_all_blk_files(amanda_t)
Chris PeBenito 9401ae1
dev_getattr_all_chr_files(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
files_read_etc_files(amanda_t)
Chris PeBenito 9401ae1
files_read_etc_runtime_files(amanda_t)
Chris PeBenito 9401ae1
files_list_all(amanda_t)
Chris PeBenito 9401ae1
files_read_all_files(amanda_t)
Chris PeBenito 9401ae1
files_read_all_symlinks(amanda_t)
Chris PeBenito 9401ae1
files_read_all_blk_files(amanda_t)
Chris PeBenito 9401ae1
files_read_all_chr_files(amanda_t)
Chris PeBenito 9401ae1
files_getattr_all_pipes(amanda_t)
Chris PeBenito 9401ae1
files_getattr_all_sockets(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
fs_getattr_xattr_fs(amanda_t)
Chris PeBenito 9401ae1
fs_list_all(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
storage_raw_read_fixed_disk(amanda_t)
Chris PeBenito 9401ae1
storage_read_tape(amanda_t)
Chris PeBenito 9401ae1
storage_write_tape(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
auth_use_nsswitch(amanda_t)
Chris PeBenito 9401ae1
auth_read_shadow(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
logging_send_syslog_msg(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
########################################
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
# Amanda recover local policy
Chris PeBenito 9401ae1
#
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
allow amanda_recover_t self:capability { fowner fsetid kill setgid setuid chown dac_override };
Chris PeBenito 9401ae1
allow amanda_recover_t self:process { sigkill sigstop signal };
Chris PeBenito 9401ae1
allow amanda_recover_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 9401ae1
allow amanda_recover_t self:unix_stream_socket { connect create read write };
Chris PeBenito 9401ae1
allow amanda_recover_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 9401ae1
allow amanda_recover_t self:udp_socket create_socket_perms;
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_files_pattern(amanda_recover_t, amanda_log_t, amanda_log_t)
Chris PeBenito 9401ae1
manage_lnk_files_pattern(amanda_recover_t, amanda_log_t, amanda_log_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
Chris PeBenito 9401ae1
manage_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
Chris PeBenito 9401ae1
manage_lnk_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
Chris PeBenito 9401ae1
manage_fifo_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
Chris PeBenito 9401ae1
manage_sock_files_pattern(amanda_recover_t, amanda_recover_dir_t, amanda_recover_dir_t)
Chris PeBenito 9401ae1
userdom_user_home_dir_filetrans(amanda_recover_t, amanda_recover_dir_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
manage_dirs_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
manage_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
manage_lnk_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
manage_fifo_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
manage_sock_files_pattern(amanda_recover_t, amanda_tmp_t, amanda_tmp_t)
Chris PeBenito 9401ae1
files_tmp_filetrans(amanda_recover_t, amanda_tmp_t, { dir file lnk_file sock_file fifo_file })
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
kernel_read_system_state(amanda_recover_t)
Chris PeBenito 9401ae1
kernel_read_kernel_sysctls(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
corecmd_exec_shell(amanda_recover_t)
Chris PeBenito 9401ae1
corecmd_exec_bin(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
corenet_all_recvfrom_unlabeled(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_all_recvfrom_netlabel(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_if(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_generic_if(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_generic_node(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_generic_node(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_sendrecv_all_ports(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_udp_sendrecv_all_ports(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_generic_node(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_udp_bind_generic_node(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_bind_reserved_port(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_tcp_connect_amanda_port(amanda_recover_t)
Chris PeBenito 9401ae1
corenet_sendrecv_amanda_client_packets(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
domain_use_interactive_fds(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
files_read_etc_files(amanda_recover_t)
Chris PeBenito 9401ae1
files_read_etc_runtime_files(amanda_recover_t)
Chris PeBenito 9401ae1
files_search_tmp(amanda_recover_t)
Chris PeBenito 9401ae1
files_search_pids(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
auth_use_nsswitch(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
fstools_domtrans(amanda_t)
Chris PeBenito 9401ae1
fstools_signal(amanda_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
logging_search_logs(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
miscfiles_read_localization(amanda_recover_t)
Chris PeBenito 9401ae1
Chris PeBenito 9401ae1
userdom_use_user_terminals(amanda_recover_t)
Chris PeBenito 9401ae1
userdom_search_user_home_content(amanda_recover_t)