1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
97 lines
2.1 KiB
Plaintext
97 lines
2.1 KiB
Plaintext
|
|
policy_module(rshd,1.2.1)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
type rshd_t;
|
|
type rshd_exec_t;
|
|
inetd_tcp_service_domain(rshd_t,rshd_exec_t)
|
|
domain_subj_id_change_exemption(rshd_t)
|
|
domain_role_change_exemption(rshd_t)
|
|
role system_r types rshd_t;
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
allow rshd_t self:capability { setuid setgid fowner fsetid chown dac_override };
|
|
allow rshd_t self:process { signal_perms fork setsched setpgid setexec };
|
|
allow rshd_t self:fifo_file rw_fifo_file_perms;
|
|
allow rshd_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
kernel_read_kernel_sysctls(rshd_t)
|
|
|
|
corenet_all_recvfrom_unlabeled(rshd_t)
|
|
corenet_all_recvfrom_netlabel(rshd_t)
|
|
corenet_tcp_sendrecv_generic_if(rshd_t)
|
|
corenet_udp_sendrecv_generic_if(rshd_t)
|
|
corenet_tcp_sendrecv_all_nodes(rshd_t)
|
|
corenet_udp_sendrecv_all_nodes(rshd_t)
|
|
corenet_tcp_sendrecv_all_ports(rshd_t)
|
|
corenet_udp_sendrecv_all_ports(rshd_t)
|
|
corenet_tcp_bind_all_nodes(rshd_t)
|
|
corenet_tcp_bind_rsh_port(rshd_t)
|
|
corenet_sendrecv_rsh_server_packets(rshd_t)
|
|
|
|
dev_read_urand(rshd_t)
|
|
|
|
selinux_get_fs_mount(rshd_t)
|
|
selinux_validate_context(rshd_t)
|
|
selinux_compute_access_vector(rshd_t)
|
|
selinux_compute_create_context(rshd_t)
|
|
selinux_compute_relabel_context(rshd_t)
|
|
selinux_compute_user_contexts(rshd_t)
|
|
|
|
auth_domtrans_chk_passwd(rshd_t)
|
|
|
|
corecmd_read_bin_symlinks(rshd_t)
|
|
|
|
files_list_home(rshd_t)
|
|
files_read_etc_files(rshd_t)
|
|
files_search_tmp(rshd_t)
|
|
|
|
libs_use_ld_so(rshd_t)
|
|
libs_use_shared_libs(rshd_t)
|
|
|
|
logging_send_syslog_msg(rshd_t)
|
|
|
|
miscfiles_read_localization(rshd_t)
|
|
|
|
seutil_read_config(rshd_t)
|
|
seutil_read_default_contexts(rshd_t)
|
|
|
|
sysnet_read_config(rshd_t)
|
|
|
|
userdom_search_all_users_home_content(rshd_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
unconfined_domain(rshd_t)
|
|
unconfined_shell_domtrans(rshd_t)
|
|
')
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
|
fs_read_nfs_files(rshd_t)
|
|
fs_read_nfs_symlinks(rshd_t)
|
|
')
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
fs_read_cifs_files(rshd_t)
|
|
fs_read_cifs_symlinks(rshd_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
kerberos_use(rshd_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
nscd_socket_use(rshd_t)
|
|
')
|
|
|
|
ifdef(`TODO',`
|
|
optional_policy(`
|
|
allow rshd_t rlogind_tmp_t:file rw_file_perms;
|
|
')
|
|
')
|