|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
d3d270 |
policy_module(rsync,1.2.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 |
de9408 |
init_daemon_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 |
103fe2 |
files_tmp_filetrans(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 |
1c1ac6 |
files_pid_filetrans(rsync_t,rsync_var_run_t,file)
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
445522 |
kernel_read_kernel_sysctls(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 |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
44d5d9 |
daemontools_service_domain(rsync_t, rsync_exec_t)
|
|
Chris PeBenito |
44d5d9 |
')
|
|
Chris PeBenito |
44d5d9 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
35ecf8 |
kerberos_use(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
de9408 |
inetd_service_domain(rsync_t,rsync_exec_t)
|
|
Chris PeBenito |
de9408 |
')
|
|
Chris PeBenito |
de9408 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
35ecf8 |
nis_use_ypbind(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|
|
Chris PeBenito |
35ecf8 |
|
|
Chris PeBenito |
bb7170 |
optional_policy(`
|
|
Chris PeBenito |
1815ba |
nscd_socket_use(rsync_t)
|
|
Chris PeBenito |
35ecf8 |
')
|