|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0251df |
policy_module(rsync,1.4.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
56e1b3 |
## <desc>
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## Allow rsync to modify public files
|
|
Chris PeBenito |
56e1b3 |
## used for public file transfer services.
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
56e1b3 |
gen_tunable(allow_rsync_anon_write,false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
17de1b |
type rsync_t;
|
|
Chris PeBenito |
17de1b |
type rsync_exec_t;
|
|
Chris PeBenito |
17de1b |
init_daemon_domain(rsync_t,rsync_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types rsync_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type rsync_data_t;
|
|
Chris PeBenito |
17de1b |
files_type(rsync_data_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type rsync_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(rsync_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type rsync_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(rsync_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 |
17de1b |
allow rsync_t self:capability sys_chroot;
|
|
Chris PeBenito |
17de1b |
allow rsync_t self:process signal_perms;
|
|
Chris PeBenito |
c0868a |
allow rsync_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
allow rsync_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow rsync_t self:udp_socket connected_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# for identd
|
|
Chris PeBenito |
17de1b |
# cjp: this should probably only be inetd_child_t rules?
|
|
Chris PeBenito |
17de1b |
# search home and kerberos also.
|
|
Chris PeBenito |
17de1b |
allow rsync_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow rsync_t self:capability { setuid setgid };
|
|
Chris PeBenito |
17de1b |
#end for identd
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow rsync_t rsync_data_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern(rsync_t,rsync_data_t,rsync_data_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern(rsync_t,rsync_data_t,rsync_data_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(rsync_t,rsync_tmp_t,rsync_tmp_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(rsync_t,rsync_tmp_t,rsync_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(rsync_t, rsync_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(rsync_t,rsync_var_run_t,rsync_var_run_t)
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(rsync_t,rsync_var_run_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(rsync_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(rsync_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corenet_non_ipsec_sendrecv(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_if(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_if(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_all_nodes(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_rsync_port(rsync_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_rsync_server_packets(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_xattr_fs(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(rsync_t)
|
|
Chris PeBenito |
17de1b |
files_search_home(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(rsync_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(rsync_t)
|
|
Chris PeBenito |
17de1b |
logging_dontaudit_search_logs(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(rsync_t)
|
|
Chris PeBenito |
17de1b |
miscfiles_read_public_files(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
sysnet_read_config(rsync_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
tunable_policy(`allow_rsync_anon_write',`
|
|
Chris PeBenito |
17de1b |
miscfiles_manage_public_files(rsync_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
daemontools_service_domain(rsync_t, rsync_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
kerberos_use(rsync_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
inetd_service_domain(rsync_t,rsync_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nis_use_ypbind(rsync_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
nscd_socket_use(rsync_t)
|
|
Chris PeBenito |
17de1b |
')
|