|
Chris PeBenito |
29af4c |
policy_module(ssh, 2.2.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 host key based authentication
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(allow_ssh_keysign, false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
56e1b3 |
## <desc>
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## Allow ssh logins as sysadm_r:sysadm_t
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(ssh_sysadm_login, false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Dan Walsh |
3eaa99 |
## <desc>
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## allow sshd to forward port connections
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## </desc>
|
|
Dan Walsh |
3eaa99 |
gen_tunable(sshd_forward_ports, false)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
17de1b |
attribute ssh_server;
|
|
Chris PeBenito |
296273 |
attribute ssh_agent_type;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
type ssh_keygen_t;
|
|
Chris PeBenito |
17de1b |
type ssh_keygen_exec_t;
|
|
Chris PeBenito |
0bfccd |
init_system_domain(ssh_keygen_t, ssh_keygen_exec_t)
|
|
Chris PeBenito |
75beb9 |
role system_r types ssh_keygen_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
e070dd |
type sshd_exec_t;
|
|
Chris PeBenito |
17de1b |
corecmd_executable_file(sshd_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
ssh_server_template(sshd)
|
|
Chris PeBenito |
0bfccd |
init_daemon_domain(sshd_t, sshd_exec_t)
|
|
Chris PeBenito |
6b19be |
|
|
Dan Walsh |
3eaa99 |
type sshd_initrc_exec_t;
|
|
Dan Walsh |
3eaa99 |
init_script_file(sshd_initrc_exec_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
17de1b |
type sshd_key_t;
|
|
Chris PeBenito |
17de1b |
files_type(sshd_key_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
ifdef(`enable_mcs',`
|
|
Chris PeBenito |
3f67f7 |
init_ranged_daemon_domain(sshd_t, sshd_exec_t, s0 - mcs_systemhigh)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
type ssh_t;
|
|
Chris PeBenito |
296273 |
type ssh_exec_t;
|
|
Chris PeBenito |
296273 |
typealias ssh_t alias { user_ssh_t staff_ssh_t sysadm_ssh_t };
|
|
Chris PeBenito |
296273 |
typealias ssh_t alias { auditadm_ssh_t secadm_ssh_t };
|
|
Chris PeBenito |
296273 |
application_domain(ssh_t, ssh_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ssh_agent_exec_t;
|
|
Chris PeBenito |
296273 |
corecmd_executable_file(ssh_agent_exec_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ssh_agent_tmp_t;
|
|
Chris PeBenito |
296273 |
typealias ssh_agent_tmp_t alias { user_ssh_agent_tmp_t staff_ssh_agent_tmp_t sysadm_ssh_agent_tmp_t };
|
|
Chris PeBenito |
296273 |
typealias ssh_agent_tmp_t alias { auditadm_ssh_agent_tmp_t secadm_ssh_agent_tmp_t };
|
|
Chris PeBenito |
296273 |
files_tmp_file(ssh_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ssh_agent_tmp_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ssh_keysign_t;
|
|
Chris PeBenito |
296273 |
type ssh_keysign_exec_t;
|
|
Chris PeBenito |
296273 |
typealias ssh_keysign_t alias { user_ssh_keysign_t staff_ssh_keysign_t sysadm_ssh_keysign_t };
|
|
Chris PeBenito |
296273 |
typealias ssh_keysign_t alias { auditadm_ssh_keysign_t secadm_ssh_keysign_t };
|
|
Chris PeBenito |
296273 |
application_domain(ssh_keysign_t, ssh_keysign_exec_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ssh_keysign_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
type ssh_tmpfs_t;
|
|
Chris PeBenito |
296273 |
typealias ssh_tmpfs_t alias { user_ssh_tmpfs_t staff_ssh_tmpfs_t sysadm_ssh_tmpfs_t };
|
|
Chris PeBenito |
296273 |
typealias ssh_tmpfs_t alias { auditadm_ssh_tmpfs_t secadm_ssh_tmpfs_t };
|
|
Chris PeBenito |
296273 |
files_tmpfs_file(ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
ubac_constrained(ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
cde150 |
type ssh_home_t;
|
|
Chris PeBenito |
cde150 |
typealias ssh_home_t alias { home_ssh_t user_ssh_home_t user_home_ssh_t staff_home_ssh_t sysadm_home_ssh_t };
|
|
Chris PeBenito |
cde150 |
typealias ssh_home_t alias { auditadm_home_ssh_t secadm_home_ssh_t };
|
|
Chris PeBenito |
cde150 |
files_type(ssh_home_t)
|
|
Chris PeBenito |
cde150 |
userdom_user_home_content(ssh_home_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
##############################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# SSH client local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ssh_t self:capability { setuid setgid dac_override dac_read_search };
|
|
Chris PeBenito |
296273 |
allow ssh_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
Chris PeBenito |
296273 |
allow ssh_t self:fd use;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
Chris PeBenito |
296273 |
allow ssh_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
Chris PeBenito |
296273 |
allow ssh_t self:shm create_shm_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:sem create_sem_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:msg { send receive };
|
|
Chris PeBenito |
cde150 |
allow ssh_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Read the ssh key file.
|
|
Chris PeBenito |
296273 |
allow ssh_t sshd_key_t:file read_file_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_fifo_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t)
|
|
Chris PeBenito |
cde150 |
fs_tmpfs_filetrans(ssh_t, ssh_tmpfs_t, { dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
edc2f7 |
manage_dirs_pattern(ssh_t, ssh_home_t, ssh_home_t)
|
|
Chris PeBenito |
edc2f7 |
manage_sock_files_pattern(ssh_t, ssh_home_t, ssh_home_t)
|
|
Chris PeBenito |
edc2f7 |
userdom_user_home_dir_filetrans(ssh_t, ssh_home_t, { dir sock_file })
|
|
Dan Walsh |
3eaa99 |
userdom_stream_connect(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# Allow the ssh program to communicate with ssh-agent.
|
|
Chris PeBenito |
296273 |
stream_connect_pattern(ssh_t, ssh_agent_tmp_t, ssh_agent_tmp_t, ssh_agent_type)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ssh_t sshd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# ssh client can manage the keys and config
|
|
Chris PeBenito |
edc2f7 |
manage_files_pattern(ssh_t, ssh_home_t, ssh_home_t)
|
|
Chris PeBenito |
edc2f7 |
read_lnk_files_pattern(ssh_t, ssh_home_t, ssh_home_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# ssh servers can read the user keys and config
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(ssh_server, ssh_home_t, ssh_home_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(ssh_server, ssh_home_t, ssh_home_t)
|
|
Dan Walsh |
3eaa99 |
userdom_user_home_dir_filetrans(ssh_server, ssh_home_t, dir)
|
|
Dan Walsh |
3eaa99 |
userdom_admin_home_dir_filetrans(ssh_server, ssh_home_t, dir)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
kernel_read_kernel_sysctls(ssh_t)
|
|
Chris PeBenito |
cde150 |
kernel_read_system_state(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_unlabeled(ssh_t)
|
|
Chris PeBenito |
296273 |
corenet_all_recvfrom_netlabel(ssh_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(ssh_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(ssh_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_sendrecv_all_ports(ssh_t)
|
|
Chris PeBenito |
296273 |
corenet_tcp_connect_ssh_port(ssh_t)
|
|
Chris PeBenito |
296273 |
corenet_sendrecv_ssh_client_packets(ssh_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_generic_node(ssh_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_all_unreserved_ports(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dev_read_urand(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
fs_getattr_all_fs(ssh_t)
|
|
Chris PeBenito |
296273 |
fs_search_auto_mountpoints(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# run helper programs - needed eg for x11-ssh-askpass
|
|
Chris PeBenito |
296273 |
corecmd_exec_shell(ssh_t)
|
|
Chris PeBenito |
296273 |
corecmd_exec_bin(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_list_home(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_usr_files(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_etc_runtime_files(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_etc_files(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_var_files(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
logging_send_syslog_msg(ssh_t)
|
|
Chris PeBenito |
296273 |
logging_read_generic_logs(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
cde150 |
auth_use_nsswitch(ssh_t)
|
|
Chris PeBenito |
cde150 |
|
|
Chris PeBenito |
296273 |
miscfiles_read_localization(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
seutil_read_config(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_list_user_home_dirs(ssh_t)
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs(ssh_t)
|
|
Chris PeBenito |
296273 |
# Write to the user domain tty.
|
|
Chris PeBenito |
296273 |
userdom_use_user_terminals(ssh_t)
|
|
Dan Walsh |
3eaa99 |
# needs to read krb/write tgt
|
|
Chris PeBenito |
296273 |
userdom_read_user_tmp_files(ssh_t)
|
|
Dan Walsh |
3eaa99 |
userdom_write_user_tmp_files(ssh_t)
|
|
Dan Walsh |
3eaa99 |
userdom_read_user_home_content_symlinks(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`allow_ssh_keysign',`
|
|
Chris PeBenito |
296273 |
domain_auto_trans(ssh_t, ssh_keysign_exec_t, ssh_keysign_t)
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t ssh_t:fd use;
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t ssh_t:process sigchld;
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t ssh_t:fifo_file rw_file_perms;
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_dirs(ssh_t)
|
|
Chris PeBenito |
296273 |
fs_manage_nfs_files(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`use_samba_home_dirs',`
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_dirs(ssh_t)
|
|
Chris PeBenito |
296273 |
fs_manage_cifs_files(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# for port forwarding
|
|
Chris PeBenito |
296273 |
tunable_policy(`user_tcp_server',`
|
|
Chris PeBenito |
296273 |
corenet_tcp_bind_ssh_port(ssh_t)
|
|
Chris PeBenito |
cde150 |
corenet_tcp_bind_generic_node(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
xserver_user_x_domain_template(ssh, ssh_t, ssh_tmpfs_t)
|
|
Chris PeBenito |
296273 |
xserver_domtrans_xauth(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# ssh_keygen local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
# ssh_keygen_t is the type of the ssh-keygen program when run at install time
|
|
Dan Walsh |
3eaa99 |
# and by sysadm_t
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dontaudit ssh_keygen_t self:capability sys_tty_config;
|
|
Dan Walsh |
3eaa99 |
allow ssh_keygen_t self:process { sigchld sigkill sigstop signull signal };
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow ssh_keygen_t self:unix_stream_socket create_stream_socket_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow ssh_keygen_t sshd_key_t:file manage_file_perms;
|
|
Dan Walsh |
3eaa99 |
files_etc_filetrans(ssh_keygen_t, sshd_key_t, file)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
kernel_read_kernel_sysctls(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
fs_search_auto_mountpoints(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dev_read_sysfs(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
dev_read_urand(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
term_dontaudit_use_console(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domain_use_interactive_fds(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_etc_files(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
init_use_fds(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
init_use_script_ptys(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
logging_send_syslog_msg(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
userdom_dontaudit_use_unpriv_user_fds(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nscd_socket_use(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
seutil_sigchld_newrole(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
udev_read_db(ssh_keygen_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
296273 |
##############################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# ssh_keysign_t local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
tunable_policy(`allow_ssh_keysign',`
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t self:capability { setgid setuid };
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ssh_keysign_t sshd_key_t:file { getattr read };
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dev_read_urand(ssh_keysign_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(ssh_keysign_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
tunable_policy(`allow_ssh_keysign',`
|
|
Chris PeBenito |
296273 |
nscd_socket_use(ssh_keysign_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
17de1b |
#################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# sshd local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# sshd_t is the domain for the sshd program.
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
# so a tunnel can point to another ssh tunnel
|
|
Chris PeBenito |
6b19be |
allow sshd_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
6b19be |
allow sshd_t self:key { search link write };
|
|
Chris PeBenito |
17de1b |
|
|
Dan Walsh |
3eaa99 |
allow sshd_t self:process setcurrent;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
kernel_search_key(sshd_t)
|
|
Chris PeBenito |
6b19be |
kernel_link_key(sshd_t)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
c3c753 |
term_use_all_ptys(sshd_t)
|
|
Chris PeBenito |
c3c753 |
term_setattr_all_ptys(sshd_t)
|
|
Dan Walsh |
3eaa99 |
term_setattr_all_ttys(sshd_t)
|
|
Chris PeBenito |
c3c753 |
term_relabelto_all_ptys(sshd_t)
|
|
Dan Walsh |
3eaa99 |
term_use_ptmx(sshd_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
6b19be |
# for X forwarding
|
|
Chris PeBenito |
6b19be |
corenet_tcp_bind_xserver_port(sshd_t)
|
|
Chris PeBenito |
6b19be |
corenet_sendrecv_xserver_server_packets(sshd_t)
|
|
Chris PeBenito |
6b19be |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`sshd_forward_ports', `
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_bind_all_unreserved_ports(sshd_t)
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_all_ports(sshd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
userdom_read_user_home_content_files(sshd_t)
|
|
Dan Walsh |
3eaa99 |
userdom_read_user_home_content_symlinks(sshd_t)
|
|
Dan Walsh |
3eaa99 |
userdom_search_admin_dir(sshd_t)
|
|
Dan Walsh |
3eaa99 |
userdom_manage_tmp_role(system_r, sshd_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
6b19be |
tunable_policy(`ssh_sysadm_login',`
|
|
Chris PeBenito |
6b19be |
# Relabel and access ptys created by sshd
|
|
Chris PeBenito |
6b19be |
# ioctl is necessary for logout() processing for utmp entry and for w to
|
|
Chris PeBenito |
6b19be |
# display the tty.
|
|
Chris PeBenito |
6b19be |
# some versions of sshd on the new SE Linux require setattr
|
|
Chris PeBenito |
6b19be |
userdom_signal_all_users(sshd_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Dan Walsh |
3eaa99 |
userdom_spec_domtrans_unpriv_users(sshd_t)
|
|
Dan Walsh |
3eaa99 |
userdom_signal_unpriv_users(sshd_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
088b65 |
daemontools_service_domain(sshd_t, sshd_exec_t)
|
|
Chris PeBenito |
cde150 |
')
|
|
Chris PeBenito |
cde150 |
|
|
Chris PeBenito |
cde150 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
kerberos_keytab_template(sshd, sshd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
ftp_dyntrans_sftpd(sshd_t)
|
|
Dan Walsh |
3eaa99 |
ftp_dyntrans_anon_sftpd(sshd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
gitosis_manage_lib_files(sshd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
088b65 |
inetd_tcp_service_domain(sshd_t, sshd_exec_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nx_read_home_files(sshd_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
rpm_use_script_fds(sshd_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
296273 |
rssh_spec_domtrans(sshd_t)
|
|
Chris PeBenito |
6b19be |
# For reading /home/user/.ssh
|
|
Chris PeBenito |
296273 |
rssh_read_ro_content(sshd_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
350b6a |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
usermanage_domtrans_passwd(sshd_t)
|
|
Dan Walsh |
3eaa99 |
usermanage_read_crack_db(sshd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
350b6a |
unconfined_shell_domtrans(sshd_t)
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
350b6a |
|
|
Chris PeBenito |
088b65 |
optional_policy(`
|
|
Chris PeBenito |
088b65 |
xserver_domtrans_xauth(sshd_t)
|
|
Chris PeBenito |
088b65 |
')
|
|
Chris PeBenito |
088b65 |
|
|
Chris PeBenito |
6b19be |
ifdef(`TODO',`
|
|
Chris PeBenito |
6b19be |
tunable_policy(`ssh_sysadm_login',`
|
|
Chris PeBenito |
6b19be |
# Relabel and access ptys created by sshd
|
|
Chris PeBenito |
6b19be |
# ioctl is necessary for logout() processing for utmp entry and for w to
|
|
Chris PeBenito |
6b19be |
# display the tty.
|
|
Chris PeBenito |
6b19be |
# some versions of sshd on the new SE Linux require setattr
|
|
Chris PeBenito |
6b19be |
allow sshd_t ptyfile:chr_file relabelto;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
domain_trans(sshd_t, xauth_exec_t, userdomain)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
6b19be |
',`
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
domain_trans(sshd_t, xauth_exec_t, unpriv_userdomain)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
6b19be |
# Relabel and access ptys created by sshd
|
|
Chris PeBenito |
6b19be |
# ioctl is necessary for logout() processing for utmp entry and for w to
|
|
Chris PeBenito |
6b19be |
# display the tty.
|
|
Chris PeBenito |
6b19be |
# some versions of sshd on the new SE Linux require setattr
|
|
Chris PeBenito |
6b19be |
allow sshd_t userpty_type:chr_file { relabelto read write getattr ioctl setattr };
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
6b19be |
') dnl endif TODO
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# ssh_keygen local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
# ssh_keygen_t is the type of the ssh-keygen program when run at install time
|
|
Chris PeBenito |
75beb9 |
# and by sysadm_t
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
dontaudit ssh_keygen_t self:capability sys_tty_config;
|
|
Chris PeBenito |
75beb9 |
allow ssh_keygen_t self:process { sigchld sigkill sigstop signull signal };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
allow ssh_keygen_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow ssh_keygen_t sshd_key_t:file manage_file_perms;
|
|
Chris PeBenito |
0bfccd |
files_etc_filetrans(ssh_keygen_t, sshd_key_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
kernel_read_kernel_sysctls(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
fs_search_auto_mountpoints(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
dev_read_sysfs(ssh_keygen_t)
|
|
Chris PeBenito |
75beb9 |
dev_read_urand(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
term_dontaudit_use_console(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
domain_use_interactive_fds(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
files_read_etc_files(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
init_use_fds(ssh_keygen_t)
|
|
Chris PeBenito |
75beb9 |
init_use_script_ptys(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
cde150 |
auth_use_nsswitch(ssh_keygen_t)
|
|
Chris PeBenito |
cde150 |
|
|
Chris PeBenito |
75beb9 |
logging_send_syslog_msg(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
userdom_dontaudit_use_unpriv_user_fds(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
75beb9 |
optional_policy(`
|
|
Chris PeBenito |
75beb9 |
seutil_sigchld_newrole(ssh_keygen_t)
|
|
Chris PeBenito |
75beb9 |
')
|
|
Chris PeBenito |
75beb9 |
|
|
Chris PeBenito |
75beb9 |
optional_policy(`
|
|
Chris PeBenito |
75beb9 |
udev_read_db(ssh_keygen_t)
|
|
Chris PeBenito |
17de1b |
')
|