2005-08-22 21:17:10 +00:00
|
|
|
|
2006-01-17 20:14:04 +00:00
|
|
|
policy_module(rsync,1.2.0)
|
2005-08-22 21:17:10 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type rsync_t;
|
|
|
|
type rsync_exec_t;
|
2006-01-12 16:03:18 +00:00
|
|
|
init_daemon_domain(rsync_t,rsync_exec_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
role system_r types rsync_t;
|
|
|
|
|
|
|
|
type rsync_data_t;
|
|
|
|
files_type(rsync_data_t)
|
|
|
|
|
|
|
|
type rsync_tmp_t;
|
|
|
|
files_tmp_file(rsync_tmp_t)
|
|
|
|
|
|
|
|
type rsync_var_run_t;
|
|
|
|
files_pid_file(rsync_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2005-10-13 20:59:36 +00:00
|
|
|
allow rsync_t self:capability sys_chroot;
|
2005-08-22 21:17:10 +00:00
|
|
|
allow rsync_t self:process signal_perms;
|
|
|
|
allow rsync_t self:fifo_file rw_file_perms;
|
|
|
|
allow rsync_t self:tcp_socket { listen accept connected_socket_perms };
|
2005-10-24 17:06:34 +00:00
|
|
|
allow rsync_t self:udp_socket connected_socket_perms;
|
2005-08-22 21:17:10 +00:00
|
|
|
|
|
|
|
# for identd
|
|
|
|
# cjp: this should probably only be inetd_child_t rules?
|
|
|
|
# search home and kerberos also.
|
|
|
|
allow rsync_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
|
|
allow rsync_t self:capability { setuid setgid };
|
|
|
|
#end for identd
|
|
|
|
|
|
|
|
allow rsync_t rsync_data_t:dir r_dir_perms;
|
|
|
|
allow rsync_t rsync_data_t:file r_file_perms;
|
|
|
|
allow rsync_t rsync_data_t:lnk_file r_file_perms;
|
|
|
|
|
|
|
|
allow rsync_t rsync_tmp_t:dir create_dir_perms;
|
|
|
|
allow rsync_t rsync_tmp_t:file create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_tmp(rsync_t, rsync_tmp_t, { file dir })
|
2005-08-22 21:17:10 +00:00
|
|
|
|
|
|
|
allow rsync_t rsync_var_run_t:file create_file_perms;
|
2005-11-01 19:52:37 +00:00
|
|
|
allow rsync_t rsync_var_run_t:dir rw_dir_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(rsync_t,rsync_var_run_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
kernel_read_system_state(rsync_t)
|
|
|
|
kernel_read_network_state(rsync_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(rsync_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_if(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
corenet_raw_sendrecv_all_if(rsync_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(rsync_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
corenet_raw_sendrecv_all_nodes(rsync_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(rsync_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_sendrecv_all_ports(rsync_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
corenet_tcp_bind_all_nodes(rsync_t)
|
2005-10-24 17:06:34 +00:00
|
|
|
corenet_udp_bind_all_nodes(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
|
|
|
|
dev_read_urand(rsync_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(rsync_t)
|
|
|
|
|
|
|
|
files_read_etc_files(rsync_t)
|
|
|
|
files_search_home(rsync_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(rsync_t)
|
|
|
|
libs_use_shared_libs(rsync_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(rsync_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(rsync_t)
|
2005-10-25 19:03:15 +00:00
|
|
|
miscfiles_read_public_files(rsync_t)
|
2005-08-22 21:17:10 +00:00
|
|
|
|
|
|
|
sysnet_read_config(rsync_t)
|
|
|
|
|
2005-10-25 19:03:15 +00:00
|
|
|
tunable_policy(`allow_rsync_anon_write',`
|
|
|
|
miscfiles_manage_public_files(rsync_t)
|
|
|
|
')
|
|
|
|
|
2006-01-16 18:30:14 +00:00
|
|
|
optional_policy(`daemontools',`
|
|
|
|
daemontools_service_domain(rsync_t, rsync_exec_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`kerberos',`
|
2005-08-22 21:17:10 +00:00
|
|
|
kerberos_use(rsync_t)
|
|
|
|
')
|
|
|
|
|
2006-01-12 16:03:18 +00:00
|
|
|
optional_policy(`inetd',`
|
|
|
|
inetd_service_domain(rsync_t,rsync_exec_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-08-22 21:17:10 +00:00
|
|
|
nis_use_ypbind(rsync_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-08-22 21:17:10 +00:00
|
|
|
nscd_use_socket(rsync_t)
|
|
|
|
')
|