|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c12621 |
policy_module(ssh, 2.0.2)
|
|
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 |
|
|
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 |
|
|
Chris PeBenito |
17de1b |
type sshd_key_t;
|
|
Chris PeBenito |
17de1b |
files_type(sshd_key_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
type sshd_tmp_t;
|
|
Chris PeBenito |
6b19be |
files_tmp_file(sshd_tmp_t)
|
|
Chris PeBenito |
6b19be |
files_poly_parent(sshd_tmp_t)
|
|
Chris PeBenito |
e070dd |
|
|
Chris PeBenito |
6b19be |
ifdef(`enable_mcs',`
|
|
Chris PeBenito |
6b19be |
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 |
296273 |
type home_ssh_t;
|
|
Chris PeBenito |
296273 |
typealias home_ssh_t alias { user_home_ssh_t staff_home_ssh_t sysadm_home_ssh_t };
|
|
Chris PeBenito |
296273 |
typealias home_ssh_t alias { auditadm_home_ssh_t secadm_home_ssh_t };
|
|
Chris PeBenito |
296273 |
files_type(home_ssh_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_content(home_ssh_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 |
296273 |
allow ssh_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t self:netlink_route_socket r_netlink_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 |
# Access the ssh temporary files.
|
|
Chris PeBenito |
296273 |
allow ssh_t sshd_tmp_t:dir manage_dir_perms;
|
|
Chris PeBenito |
296273 |
allow ssh_t sshd_tmp_t:file manage_file_perms;
|
|
Chris PeBenito |
296273 |
files_tmp_filetrans(ssh_t, sshd_tmp_t, { file dir })
|
|
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 |
296273 |
fs_tmpfs_filetrans(ssh_t, ssh_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern(ssh_t,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
manage_sock_files_pattern(ssh_t,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
userdom_user_home_dir_filetrans(ssh_t, home_ssh_t, { dir sock_file })
|
|
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 |
296273 |
manage_files_pattern(ssh_t,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern(ssh_t,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# ssh servers can read the user keys and config
|
|
Chris PeBenito |
296273 |
allow ssh_server home_ssh_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
read_files_pattern(ssh_server,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
read_lnk_files_pattern(ssh_server,home_ssh_t,home_ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
kernel_read_kernel_sysctls(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)
|
|
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 |
296273 |
miscfiles_read_localization(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
seutil_read_config(ssh_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
sysnet_read_config(ssh_t)
|
|
Chris PeBenito |
296273 |
sysnet_dns_name_resolve(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)
|
|
Chris PeBenito |
296273 |
# needs to read krb tgt
|
|
Chris PeBenito |
296273 |
userdom_read_user_tmp_files(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(`read_default_t',`
|
|
Chris PeBenito |
296273 |
files_list_default(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_default_files(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_default_symlinks(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_default_sockets(ssh_t)
|
|
Chris PeBenito |
296273 |
files_read_default_pipes(ssh_t)
|
|
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 |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
kerberos_use(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
nis_use_ypbind(ssh_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
nscd_socket_use(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 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
# ssh_keygen local policy
|
|
Chris PeBenito |
296273 |
#
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
# ssh_keygen_t is the type of the ssh-keygen program when run at install time
|
|
Chris PeBenito |
296273 |
# and by sysadm_t
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dontaudit ssh_keygen_t self:capability sys_tty_config;
|
|
Chris PeBenito |
296273 |
allow ssh_keygen_t self:process { sigchld sigkill sigstop signull signal };
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ssh_keygen_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
allow ssh_keygen_t sshd_key_t:file manage_file_perms;
|
|
Chris PeBenito |
296273 |
files_etc_filetrans(ssh_keygen_t, sshd_key_t, file)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
kernel_read_kernel_sysctls(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
fs_search_auto_mountpoints(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
dev_read_sysfs(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
dev_read_urand(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
term_dontaudit_use_console(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
domain_use_interactive_fds(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
files_read_etc_files(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
init_use_fds(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
init_use_script_ptys(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
logging_send_syslog_msg(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_use_unpriv_user_fds(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
nscd_socket_use(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
seutil_sigchld_newrole(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
Chris PeBenito |
296273 |
optional_policy(`
|
|
Chris PeBenito |
296273 |
udev_read_db(ssh_keygen_t)
|
|
Chris PeBenito |
296273 |
')
|
|
Chris PeBenito |
296273 |
|
|
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 |
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(sshd_t, sshd_tmp_t, sshd_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(sshd_t, sshd_tmp_t, sshd_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_sock_files_pattern(sshd_t, sshd_tmp_t, sshd_tmp_t)
|
|
Chris PeBenito |
6b19be |
files_tmp_filetrans(sshd_t, sshd_tmp_t, { dir file sock_file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
6b19be |
kernel_search_key(sshd_t)
|
|
Chris PeBenito |
6b19be |
kernel_link_key(sshd_t)
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
term_use_all_user_ptys(sshd_t)
|
|
Chris PeBenito |
296273 |
term_setattr_all_user_ptys(sshd_t)
|
|
Chris PeBenito |
296273 |
term_relabelto_all_user_ptys(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 |
|
|
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_spec_domtrans_all_users(sshd_t)
|
|
Chris PeBenito |
6b19be |
userdom_signal_all_users(sshd_t)
|
|
Chris PeBenito |
6b19be |
',`
|
|
Chris PeBenito |
6b19be |
userdom_spec_domtrans_unpriv_users(sshd_t)
|
|
Chris PeBenito |
6b19be |
userdom_signal_unpriv_users(sshd_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
daemontools_service_domain(sshd_t, sshd_exec_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
optional_policy(`
|
|
Chris PeBenito |
6b19be |
inetd_tcp_service_domain(sshd_t, sshd_exec_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(`
|
|
Chris PeBenito |
350b6a |
unconfined_domain(sshd_t)
|
|
Chris PeBenito |
350b6a |
unconfined_shell_domtrans(sshd_t)
|
|
Chris PeBenito |
350b6a |
')
|
|
Chris PeBenito |
350b6a |
|
|
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 |
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 |
nscd_socket_use(ssh_keygen_t)
|
|
Chris PeBenito |
75beb9 |
')
|
|
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 |
')
|