|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
5ea24b |
policy_module(rsync,1.1.0)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
########################################
|
|
Chris PeBenito |
35ecf8 |
#
|
|
Chris PeBenito |
35ecf8 |
# Declarations
|
|
Chris PeBenito |
35ecf8 |
#
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
type rsync_t;
|
|
Chris PeBenito |
35ecf8 |
type rsync_exec_t;
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
ce0ff1 |
inetd_service_domain(rsync_t,rsync_exec_t)
|
|
Chris PeBenito |
35ecf8 |
role system_r types rsync_t;
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
type rsync_data_t;
|
|
Chris PeBenito |
35ecf8 |
files_type(rsync_data_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
type rsync_tmp_t;
|
|
Chris PeBenito |
35ecf8 |
files_tmp_file(rsync_tmp_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
type rsync_var_run_t;
|
|
Chris PeBenito |
35ecf8 |
files_pid_file(rsync_var_run_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
########################################
|
|
Chris PeBenito |
35ecf8 |
#
|
|
Chris PeBenito |
35ecf8 |
# Local policy
|
|
Chris PeBenito |
35ecf8 |
#
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
77f6e2 |
allow rsync_t self:capability sys_chroot;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t self:process signal_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t self:tcp_socket { listen accept connected_socket_perms };
|
|
Chris PeBenito |
162dfc |
allow rsync_t self:udp_socket connected_socket_perms;
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
# for identd
|
|
Chris PeBenito |
35ecf8 |
# cjp: this should probably only be inetd_child_t rules?
|
|
Chris PeBenito |
35ecf8 |
# search home and kerberos also.
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t self:capability { setuid setgid };
|
|
Chris PeBenito |
35ecf8 |
#end for identd
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_data_t:dir r_dir_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_data_t:file r_file_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_data_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
35ecf8 |
files_create_tmp_files(rsync_t, rsync_tmp_t, { file dir })
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
allow rsync_t rsync_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
b9ea0f |
allow rsync_t rsync_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
35ecf8 |
files_create_pid(rsync_t,rsync_var_run_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
kernel_read_kernel_sysctl(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
kernel_read_system_state(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
kernel_read_network_state(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
corenet_tcp_sendrecv_all_if(rsync_t)
|
|
Chris PeBenito |
162dfc |
corenet_udp_sendrecv_all_if(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
corenet_raw_sendrecv_all_if(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
corenet_tcp_sendrecv_all_nodes(rsync_t)
|
|
Chris PeBenito |
162dfc |
corenet_udp_sendrecv_all_nodes(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
corenet_raw_sendrecv_all_nodes(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
corenet_tcp_sendrecv_all_ports(rsync_t)
|
|
Chris PeBenito |
162dfc |
corenet_udp_sendrecv_all_ports(rsync_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
corenet_tcp_bind_all_nodes(rsync_t)
|
|
Chris PeBenito |
162dfc |
corenet_udp_bind_all_nodes(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
dev_read_urand(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
fs_getattr_xattr_fs(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
files_read_etc_files(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
files_search_home(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
libs_use_ld_so(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
libs_use_shared_libs(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
logging_send_syslog_msg(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
miscfiles_read_localization(rsync_t)
|
|
Chris PeBenito |
ccfd7b |
miscfiles_read_public_files(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
35ecf8 |
sysnet_read_config(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
ccfd7b |
tunable_policy(`allow_rsync_anon_write',`
|
|
Chris PeBenito |
ccfd7b |
miscfiles_manage_public_files(rsync_t)
|
|
Chris PeBenito |
ccfd7b |
')
|
|
Chris PeBenito |
ccfd7b |
|
|
Chris PeBenito |
132880 |
optional_policy(`kerberos',`
|
|
Chris PeBenito |
35ecf8 |
kerberos_use(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
35ecf8 |
nis_use_ypbind(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nscd',`
|
|
Chris PeBenito |
35ecf8 |
nscd_use_socket(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|