-+## Allow vidio playing tools to run unconfined ++## Allow video playing tools to run unconfined +##
+##++## Allow httpd processes to manage IPA content ++##
++##+## Allow httpd daemon to change system limits +##
+##+-## Allow Apache to communicate with avahi service via dbus +-##
+##+## Allow http daemon to check spam +##
+##--## Allow Apache to communicate with avahi service via dbus --##
++##+## Allow Apache to communicate with avahi service via dbus +##
@@ -26490,7 +26578,7 @@ index 3136c6a..1aa2421 100644 attribute httpd_script_exec_type; attribute httpd_user_script_exec_type; -@@ -166,7 +256,7 @@ files_type(httpd_cache_t) +@@ -166,7 +263,7 @@ files_type(httpd_cache_t) # httpd_config_t is the type given to the configuration files type httpd_config_t; @@ -26499,7 +26587,7 @@ index 3136c6a..1aa2421 100644 type httpd_helper_t; type httpd_helper_exec_t; -@@ -177,6 +267,9 @@ role system_r types httpd_helper_t; +@@ -177,6 +274,9 @@ role system_r types httpd_helper_t; type httpd_initrc_exec_t; init_script_file(httpd_initrc_exec_t) @@ -26509,7 +26597,7 @@ index 3136c6a..1aa2421 100644 type httpd_lock_t; files_lock_file(httpd_lock_t) -@@ -216,7 +309,21 @@ files_tmp_file(httpd_suexec_tmp_t) +@@ -216,7 +316,21 @@ files_tmp_file(httpd_suexec_tmp_t) # setup the system domain for system CGI scripts apache_content_template(sys) @@ -26532,7 +26620,7 @@ index 3136c6a..1aa2421 100644 type httpd_tmp_t; files_tmp_file(httpd_tmp_t) -@@ -226,6 +333,10 @@ files_tmpfs_file(httpd_tmpfs_t) +@@ -226,6 +340,10 @@ files_tmpfs_file(httpd_tmpfs_t) apache_content_template(user) ubac_constrained(httpd_user_script_t) @@ -26543,7 +26631,7 @@ index 3136c6a..1aa2421 100644 userdom_user_home_content(httpd_user_content_t) userdom_user_home_content(httpd_user_htaccess_t) userdom_user_home_content(httpd_user_script_exec_t) -@@ -233,6 +344,7 @@ userdom_user_home_content(httpd_user_ra_content_t) +@@ -233,6 +351,7 @@ userdom_user_home_content(httpd_user_ra_content_t) userdom_user_home_content(httpd_user_rw_content_t) typeattribute httpd_user_script_t httpd_script_domains; typealias httpd_user_content_t alias { httpd_staff_content_t httpd_sysadm_content_t }; @@ -26551,7 +26639,7 @@ index 3136c6a..1aa2421 100644 typealias httpd_user_content_t alias { httpd_auditadm_content_t httpd_secadm_content_t }; typealias httpd_user_content_t alias { httpd_staff_script_ro_t httpd_sysadm_script_ro_t }; typealias httpd_user_content_t alias { httpd_auditadm_script_ro_t httpd_secadm_script_ro_t }; -@@ -254,14 +366,23 @@ files_type(httpd_var_lib_t) +@@ -254,14 +373,23 @@ files_type(httpd_var_lib_t) type httpd_var_run_t; files_pid_file(httpd_var_run_t) @@ -26575,7 +26663,7 @@ index 3136c6a..1aa2421 100644 ######################################## # # Apache server local policy -@@ -281,11 +402,13 @@ allow httpd_t self:unix_dgram_socket { create_socket_perms sendto }; +@@ -281,11 +409,13 @@ allow httpd_t self:unix_dgram_socket { create_socket_perms sendto }; allow httpd_t self:unix_stream_socket { create_stream_socket_perms connectto }; allow httpd_t self:tcp_socket create_stream_socket_perms; allow httpd_t self:udp_socket create_socket_perms; @@ -26589,7 +26677,7 @@ index 3136c6a..1aa2421 100644 # Allow the httpd_t to read the web servers config files allow httpd_t httpd_config_t:dir list_dir_perms; -@@ -329,8 +452,9 @@ allow httpd_t httpd_sys_script_t:unix_stream_socket connectto; +@@ -329,8 +459,9 @@ allow httpd_t httpd_sys_script_t:unix_stream_socket connectto; manage_dirs_pattern(httpd_t, httpd_tmp_t, httpd_tmp_t) manage_files_pattern(httpd_t, httpd_tmp_t, httpd_tmp_t) @@ -26600,7 +26688,7 @@ index 3136c6a..1aa2421 100644 manage_dirs_pattern(httpd_t, httpd_tmpfs_t, httpd_tmpfs_t) manage_files_pattern(httpd_t, httpd_tmpfs_t, httpd_tmpfs_t) -@@ -355,6 +479,9 @@ manage_lnk_files_pattern(httpd_t, squirrelmail_spool_t, squirrelmail_spool_t) +@@ -355,6 +486,9 @@ manage_lnk_files_pattern(httpd_t, squirrelmail_spool_t, squirrelmail_spool_t) kernel_read_kernel_sysctls(httpd_t) # for modules that want to access /proc/meminfo kernel_read_system_state(httpd_t) @@ -26610,7 +26698,7 @@ index 3136c6a..1aa2421 100644 corenet_all_recvfrom_unlabeled(httpd_t) corenet_all_recvfrom_netlabel(httpd_t) -@@ -365,11 +492,15 @@ corenet_udp_sendrecv_generic_node(httpd_t) +@@ -365,11 +499,15 @@ corenet_udp_sendrecv_generic_node(httpd_t) corenet_tcp_sendrecv_all_ports(httpd_t) corenet_udp_sendrecv_all_ports(httpd_t) corenet_tcp_bind_generic_node(httpd_t) @@ -26627,7 +26715,7 @@ index 3136c6a..1aa2421 100644 dev_read_sysfs(httpd_t) dev_read_rand(httpd_t) -@@ -378,12 +509,12 @@ dev_rw_crypto(httpd_t) +@@ -378,12 +516,12 @@ dev_rw_crypto(httpd_t) fs_getattr_all_fs(httpd_t) fs_search_auto_mountpoints(httpd_t) @@ -26643,7 +26731,7 @@ index 3136c6a..1aa2421 100644 domain_use_interactive_fds(httpd_t) -@@ -391,6 +522,7 @@ files_dontaudit_getattr_all_pids(httpd_t) +@@ -391,6 +529,7 @@ files_dontaudit_getattr_all_pids(httpd_t) files_read_usr_files(httpd_t) files_list_mnt(httpd_t) files_search_spool(httpd_t) @@ -26651,7 +26739,7 @@ index 3136c6a..1aa2421 100644 files_read_var_lib_files(httpd_t) files_search_home(httpd_t) files_getattr_home_dir(httpd_t) -@@ -402,48 +534,101 @@ files_read_etc_files(httpd_t) +@@ -402,48 +541,101 @@ files_read_etc_files(httpd_t) files_read_var_lib_symlinks(httpd_t) fs_search_auto_mountpoints(httpd_sys_script_t) @@ -26755,7 +26843,7 @@ index 3136c6a..1aa2421 100644 ') tunable_policy(`httpd_enable_cgi && httpd_use_nfs',` -@@ -456,25 +641,55 @@ tunable_policy(`httpd_enable_cgi && httpd_use_cifs',` +@@ -456,25 +648,55 @@ tunable_policy(`httpd_enable_cgi && httpd_use_cifs',` tunable_policy(`httpd_enable_cgi && httpd_unified && httpd_builtin_scripting',` domtrans_pattern(httpd_t, httpdcontent, httpd_sys_script_t) @@ -26813,7 +26901,7 @@ index 3136c6a..1aa2421 100644 tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',` fs_read_cifs_files(httpd_t) fs_read_cifs_symlinks(httpd_t) -@@ -484,7 +699,16 @@ tunable_policy(`httpd_can_sendmail',` +@@ -484,7 +706,16 @@ tunable_policy(`httpd_can_sendmail',` # allow httpd to connect to mail servers corenet_tcp_connect_smtp_port(httpd_t) corenet_sendrecv_smtp_client_packets(httpd_t) @@ -26830,7 +26918,7 @@ index 3136c6a..1aa2421 100644 ') tunable_policy(`httpd_ssi_exec',` -@@ -499,9 +723,19 @@ tunable_policy(`httpd_ssi_exec',` +@@ -499,9 +730,19 @@ tunable_policy(`httpd_ssi_exec',` # to run correctly without this permission, so the permission # are dontaudited here. tunable_policy(`httpd_tty_comm',` @@ -26851,7 +26939,7 @@ index 3136c6a..1aa2421 100644 ') optional_policy(` -@@ -513,7 +747,13 @@ optional_policy(` +@@ -513,7 +754,13 @@ optional_policy(` ') optional_policy(` @@ -26866,7 +26954,7 @@ index 3136c6a..1aa2421 100644 ') optional_policy(` -@@ -528,7 +768,19 @@ optional_policy(` +@@ -528,7 +775,19 @@ optional_policy(` daemontools_service_domain(httpd_t, httpd_exec_t) ') @@ -26887,7 +26975,7 @@ index 3136c6a..1aa2421 100644 dbus_system_bus_client(httpd_t) tunable_policy(`httpd_dbus_avahi',` -@@ -537,8 +789,13 @@ optional_policy(` +@@ -537,8 +796,13 @@ optional_policy(` ') optional_policy(` @@ -26902,7 +26990,7 @@ index 3136c6a..1aa2421 100644 ') ') -@@ -556,7 +813,13 @@ optional_policy(` +@@ -556,7 +820,21 @@ optional_policy(` ') optional_policy(` @@ -26911,12 +26999,20 @@ index 3136c6a..1aa2421 100644 +') + +optional_policy(` ++ memcached_stream_connect(httpd_t) ++ ++ tunable_policy(`httpd_manage_ipa',` ++ memcached_manage_pid_files(httpd_t) ++ ') ++') ++ ++optional_policy(` # Allow httpd to work with mysql + mysql_read_config(httpd_t) mysql_stream_connect(httpd_t) mysql_rw_db_sockets(httpd_t) -@@ -567,6 +830,7 @@ optional_policy(` +@@ -567,6 +845,7 @@ optional_policy(` optional_policy(` nagios_read_config(httpd_t) @@ -26924,7 +27020,7 @@ index 3136c6a..1aa2421 100644 ') optional_policy(` -@@ -577,6 +841,20 @@ optional_policy(` +@@ -577,6 +856,20 @@ optional_policy(` ') optional_policy(` @@ -26945,7 +27041,7 @@ index 3136c6a..1aa2421 100644 # Allow httpd to work with postgresql postgresql_stream_connect(httpd_t) postgresql_unpriv_client(httpd_t) -@@ -591,6 +869,11 @@ optional_policy(` +@@ -591,6 +884,11 @@ optional_policy(` ') optional_policy(` @@ -26957,7 +27053,7 @@ index 3136c6a..1aa2421 100644 snmp_dontaudit_read_snmp_var_lib_files(httpd_t) snmp_dontaudit_write_snmp_var_lib_files(httpd_t) ') -@@ -603,6 +886,12 @@ optional_policy(` +@@ -603,6 +901,12 @@ optional_policy(` yam_read_content(httpd_t) ') @@ -26970,7 +27066,7 @@ index 3136c6a..1aa2421 100644 ######################################## # # Apache helper local policy -@@ -616,7 +905,11 @@ allow httpd_helper_t httpd_log_t:file append_file_perms; +@@ -616,7 +920,11 @@ allow httpd_helper_t httpd_log_t:file append_file_perms; logging_send_syslog_msg(httpd_helper_t) @@ -26983,7 +27079,7 @@ index 3136c6a..1aa2421 100644 ######################################## # -@@ -654,28 +947,30 @@ libs_exec_lib_files(httpd_php_t) +@@ -654,28 +962,30 @@ libs_exec_lib_files(httpd_php_t) userdom_use_unpriv_users_fds(httpd_php_t) tunable_policy(`httpd_can_network_connect_db',` @@ -27027,7 +27123,7 @@ index 3136c6a..1aa2421 100644 ') ######################################## -@@ -685,6 +980,8 @@ optional_policy(` +@@ -685,6 +995,8 @@ optional_policy(` allow httpd_suexec_t self:capability { setuid setgid }; allow httpd_suexec_t self:process signal_perms; @@ -27036,7 +27132,7 @@ index 3136c6a..1aa2421 100644 allow httpd_suexec_t self:unix_stream_socket create_stream_socket_perms; domtrans_pattern(httpd_t, httpd_suexec_exec_t, httpd_suexec_t) -@@ -699,17 +996,22 @@ manage_dirs_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t) +@@ -699,17 +1011,22 @@ manage_dirs_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t) manage_files_pattern(httpd_suexec_t, httpd_suexec_tmp_t, httpd_suexec_tmp_t) files_tmp_filetrans(httpd_suexec_t, httpd_suexec_tmp_t, { file dir }) @@ -27062,7 +27158,7 @@ index 3136c6a..1aa2421 100644 files_read_etc_files(httpd_suexec_t) files_read_usr_files(httpd_suexec_t) -@@ -740,13 +1042,31 @@ tunable_policy(`httpd_can_network_connect',` +@@ -740,13 +1057,31 @@ tunable_policy(`httpd_can_network_connect',` corenet_sendrecv_all_client_packets(httpd_suexec_t) ') @@ -27095,7 +27191,7 @@ index 3136c6a..1aa2421 100644 fs_read_nfs_files(httpd_suexec_t) fs_read_nfs_symlinks(httpd_suexec_t) fs_exec_nfs_files(httpd_suexec_t) -@@ -769,6 +1089,25 @@ optional_policy(` +@@ -769,6 +1104,25 @@ optional_policy(` dontaudit httpd_suexec_t httpd_t:unix_stream_socket { read write }; ') @@ -27121,7 +27217,7 @@ index 3136c6a..1aa2421 100644 ######################################## # # Apache system script local policy -@@ -789,12 +1128,17 @@ read_lnk_files_pattern(httpd_sys_script_t, squirrelmail_spool_t, squirrelmail_sp +@@ -789,12 +1143,17 @@ read_lnk_files_pattern(httpd_sys_script_t, squirrelmail_spool_t, squirrelmail_sp kernel_read_kernel_sysctls(httpd_sys_script_t) @@ -27139,7 +27235,7 @@ index 3136c6a..1aa2421 100644 ifdef(`distro_redhat',` allow httpd_sys_script_t httpd_log_t:file append_file_perms; ') -@@ -803,18 +1147,50 @@ tunable_policy(`httpd_can_sendmail',` +@@ -803,18 +1162,50 @@ tunable_policy(`httpd_can_sendmail',` mta_send_mail(httpd_sys_script_t) ') @@ -27196,7 +27292,7 @@ index 3136c6a..1aa2421 100644 corenet_tcp_sendrecv_all_ports(httpd_sys_script_t) corenet_udp_sendrecv_all_ports(httpd_sys_script_t) corenet_tcp_connect_all_ports(httpd_sys_script_t) -@@ -822,14 +1198,29 @@ tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',` +@@ -822,14 +1213,29 @@ tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',` ') tunable_policy(`httpd_enable_homedirs',` @@ -27227,7 +27323,7 @@ index 3136c6a..1aa2421 100644 tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',` fs_read_cifs_files(httpd_sys_script_t) fs_read_cifs_symlinks(httpd_sys_script_t) -@@ -842,10 +1233,20 @@ optional_policy(` +@@ -842,10 +1248,20 @@ optional_policy(` optional_policy(` mysql_stream_connect(httpd_sys_script_t) mysql_rw_db_sockets(httpd_sys_script_t) @@ -27248,7 +27344,7 @@ index 3136c6a..1aa2421 100644 ') ######################################## -@@ -891,11 +1292,135 @@ optional_policy(` +@@ -891,11 +1307,135 @@ optional_policy(` tunable_policy(`httpd_enable_cgi && httpd_unified',` allow httpd_user_script_t httpdcontent:file entrypoint; @@ -27493,7 +27589,7 @@ index 1ea99b2..3582863 100644 + stream_connect_pattern($1, apmd_var_run_t, apmd_var_run_t, apmd_t) ') diff --git a/policy/modules/services/apm.te b/policy/modules/services/apm.te -index 1c8c27e..01d69d4 100644 +index 1c8c27e..29bb904 100644 --- a/policy/modules/services/apm.te +++ b/policy/modules/services/apm.te @@ -4,6 +4,7 @@ policy_module(apm, 1.11.0) @@ -27534,7 +27630,15 @@ index 1c8c27e..01d69d4 100644 dev_read_realtime_clock(apmd_t) dev_read_urand(apmd_t) dev_rw_apm_bios(apmd_t) -@@ -114,6 +118,8 @@ files_dontaudit_getattr_all_symlinks(apmd_t) # Excessive? +@@ -101,7 +105,6 @@ selinux_search_fs(apmd_t) + corecmd_exec_all_executables(apmd_t) + + domain_read_all_domains_state(apmd_t) +-domain_dontaudit_ptrace_all_domains(apmd_t) + domain_use_interactive_fds(apmd_t) + domain_dontaudit_getattr_all_sockets(apmd_t) + domain_dontaudit_getattr_all_key_sockets(apmd_t) # Excessive? +@@ -114,6 +117,8 @@ files_dontaudit_getattr_all_symlinks(apmd_t) # Excessive? files_dontaudit_getattr_all_pipes(apmd_t) # Excessive? files_dontaudit_getattr_all_sockets(apmd_t) # Excessive? @@ -27543,7 +27647,7 @@ index 1c8c27e..01d69d4 100644 init_domtrans_script(apmd_t) init_rw_utmp(apmd_t) init_telinit(apmd_t) -@@ -127,10 +133,8 @@ logging_send_audit_msgs(apmd_t) +@@ -127,10 +132,8 @@ logging_send_audit_msgs(apmd_t) miscfiles_read_localization(apmd_t) miscfiles_read_hwdata(apmd_t) @@ -27555,7 +27659,7 @@ index 1c8c27e..01d69d4 100644 userdom_dontaudit_use_unpriv_user_fds(apmd_t) userdom_dontaudit_search_user_home_dirs(apmd_t) -@@ -142,9 +146,8 @@ ifdef(`distro_redhat',` +@@ -142,9 +145,8 @@ ifdef(`distro_redhat',` can_exec(apmd_t, apmd_var_run_t) @@ -27566,7 +27670,7 @@ index 1c8c27e..01d69d4 100644 ') optional_policy(` -@@ -155,6 +158,15 @@ ifdef(`distro_redhat',` +@@ -155,6 +157,15 @@ ifdef(`distro_redhat',` netutils_domtrans(apmd_t) ') @@ -27582,7 +27686,7 @@ index 1c8c27e..01d69d4 100644 ',` # for ifconfig which is run all the time kernel_dontaudit_search_sysctl(apmd_t) -@@ -181,6 +193,12 @@ optional_policy(` +@@ -181,6 +192,12 @@ optional_policy(` ') optional_policy(` @@ -27595,7 +27699,7 @@ index 1c8c27e..01d69d4 100644 dbus_system_bus_client(apmd_t) optional_policy(` -@@ -201,7 +219,8 @@ optional_policy(` +@@ -201,7 +218,8 @@ optional_policy(` ') optional_policy(` @@ -27605,7 +27709,7 @@ index 1c8c27e..01d69d4 100644 ') optional_policy(` -@@ -209,8 +228,9 @@ optional_policy(` +@@ -209,8 +227,9 @@ optional_policy(` pcmcia_domtrans_cardctl(apmd_t) ') @@ -27616,7 +27720,7 @@ index 1c8c27e..01d69d4 100644 ') optional_policy(` -@@ -219,10 +239,6 @@ optional_policy(` +@@ -219,10 +238,6 @@ optional_policy(` ') optional_policy(` @@ -28926,10 +29030,10 @@ index 0000000..9fe3f9e +') diff --git a/policy/modules/services/boinc.te b/policy/modules/services/boinc.te new file mode 100644 -index 0000000..040aa2e +index 0000000..dac00da --- /dev/null +++ b/policy/modules/services/boinc.te -@@ -0,0 +1,171 @@ +@@ -0,0 +1,167 @@ +policy_module(boinc, 1.0.0) + +######################################## @@ -29068,10 +29172,6 @@ index 0000000..040aa2e +allow boinc_project_t self:process { setpgid setsched signal signull sigkill sigstop }; +allow boinc_project_t self:process { execmem execstack }; + -+tunable_policy(`deny_ptrace',`',` -+ allow boinc_project_t self:process ptrace; -+') -+ +manage_dirs_pattern(boinc_project_t, boinc_project_tmp_t, boinc_project_tmp_t) +manage_files_pattern(boinc_project_t, boinc_project_tmp_t, boinc_project_tmp_t) +files_tmp_filetrans(boinc_project_t, boinc_project_tmp_t, { dir file }) @@ -29944,7 +30044,7 @@ index 6ee2cc8..b509c40 100644 ## ##++## Allow polipo to connect to all ports > 1023 ++##
++##-+## allow sshd to forward port connections -+##
-+##-## Allow ssh logins as sysadm_r:sysadm_t +## Allow ssh with chroot env to read and write files @@ -63384,7 +63703,7 @@ index 2dad3c8..cf94c2b 100644 type sshd_exec_t; corecmd_executable_file(sshd_exec_t) -@@ -33,17 +51,12 @@ corecmd_executable_file(sshd_exec_t) +@@ -33,17 +44,12 @@ corecmd_executable_file(sshd_exec_t) ssh_server_template(sshd) init_daemon_domain(sshd_t, sshd_exec_t) @@ -63405,7 +63724,7 @@ index 2dad3c8..cf94c2b 100644 type ssh_t; type ssh_exec_t; typealias ssh_t alias { user_ssh_t staff_ssh_t sysadm_ssh_t }; -@@ -76,8 +89,12 @@ ubac_constrained(ssh_tmpfs_t) +@@ -76,8 +82,12 @@ ubac_constrained(ssh_tmpfs_t) type ssh_home_t; typealias ssh_home_t alias { home_ssh_t user_ssh_home_t user_home_ssh_t staff_home_ssh_t sysadm_home_ssh_t }; typealias ssh_home_t alias { auditadm_home_ssh_t secadm_home_ssh_t }; @@ -63419,7 +63738,7 @@ index 2dad3c8..cf94c2b 100644 ############################## # -@@ -88,6 +105,7 @@ allow ssh_t self:capability { setuid setgid dac_override dac_read_search }; +@@ -88,6 +98,7 @@ allow ssh_t self:capability { setuid setgid dac_override dac_read_search }; allow ssh_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap }; allow ssh_t self:fd use; allow ssh_t self:fifo_file rw_fifo_file_perms; @@ -63427,7 +63746,7 @@ index 2dad3c8..cf94c2b 100644 allow ssh_t self:unix_dgram_socket { create_socket_perms sendto }; allow ssh_t self:unix_stream_socket { create_stream_socket_perms connectto }; allow ssh_t self:shm create_shm_perms; -@@ -95,15 +113,11 @@ allow ssh_t self:sem create_sem_perms; +@@ -95,15 +106,11 @@ allow ssh_t self:sem create_sem_perms; allow ssh_t self:msgq create_msgq_perms; allow ssh_t self:msg { send receive }; allow ssh_t self:tcp_socket create_stream_socket_perms; @@ -63444,7 +63763,7 @@ index 2dad3c8..cf94c2b 100644 manage_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t) manage_lnk_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t) manage_fifo_files_pattern(ssh_t, ssh_tmpfs_t, ssh_tmpfs_t) -@@ -113,20 +127,26 @@ fs_tmpfs_filetrans(ssh_t, ssh_tmpfs_t, { dir file lnk_file sock_file fifo_file } +@@ -113,20 +120,26 @@ fs_tmpfs_filetrans(ssh_t, ssh_tmpfs_t, { dir file lnk_file sock_file fifo_file } manage_dirs_pattern(ssh_t, ssh_home_t, ssh_home_t) manage_sock_files_pattern(ssh_t, ssh_home_t, ssh_home_t) userdom_user_home_dir_filetrans(ssh_t, ssh_home_t, { dir sock_file }) @@ -63474,7 +63793,7 @@ index 2dad3c8..cf94c2b 100644 kernel_read_kernel_sysctls(ssh_t) kernel_read_system_state(ssh_t) -@@ -138,7 +158,11 @@ corenet_tcp_sendrecv_generic_node(ssh_t) +@@ -138,7 +151,11 @@ corenet_tcp_sendrecv_generic_node(ssh_t) corenet_tcp_sendrecv_all_ports(ssh_t) corenet_tcp_connect_ssh_port(ssh_t) corenet_sendrecv_ssh_client_packets(ssh_t) @@ -63486,7 +63805,7 @@ index 2dad3c8..cf94c2b 100644 dev_read_urand(ssh_t) fs_getattr_all_fs(ssh_t) -@@ -162,31 +186,24 @@ logging_read_generic_logs(ssh_t) +@@ -162,31 +179,24 @@ logging_read_generic_logs(ssh_t) auth_use_nsswitch(ssh_t) miscfiles_read_localization(ssh_t) @@ -63527,7 +63846,7 @@ index 2dad3c8..cf94c2b 100644 ') # for port forwarding -@@ -196,10 +213,15 @@ tunable_policy(`user_tcp_server',` +@@ -196,10 +206,15 @@ tunable_policy(`user_tcp_server',` ') optional_policy(` @@ -63543,7 +63862,7 @@ index 2dad3c8..cf94c2b 100644 ############################## # # ssh_keysign_t local policy -@@ -209,19 +231,14 @@ tunable_policy(`allow_ssh_keysign',` +@@ -209,19 +224,14 @@ tunable_policy(`allow_ssh_keysign',` allow ssh_keysign_t self:capability { setgid setuid }; allow ssh_keysign_t self:unix_stream_socket create_socket_perms; @@ -63565,7 +63884,7 @@ index 2dad3c8..cf94c2b 100644 ################################# # # sshd local policy -@@ -232,33 +249,44 @@ optional_policy(` +@@ -232,33 +242,39 @@ optional_policy(` # so a tunnel can point to another ssh tunnel allow sshd_t self:netlink_route_socket r_netlink_socket_perms; allow sshd_t self:key { search link write }; @@ -63596,11 +63915,6 @@ index 2dad3c8..cf94c2b 100644 +userdom_signal_unpriv_users(sshd_t) +userdom_dyntransition_unpriv_users(sshd_t) + -+tunable_policy(`sshd_forward_ports',` -+ corenet_tcp_bind_all_unreserved_ports(sshd_t) -+ corenet_tcp_connect_all_ports(sshd_t) -+') -+ tunable_policy(`ssh_sysadm_login',` # Relabel and access ptys created by sshd # ioctl is necessary for logout() processing for utmp entry and for w to @@ -63619,7 +63933,7 @@ index 2dad3c8..cf94c2b 100644 ') optional_policy(` -@@ -266,11 +294,24 @@ optional_policy(` +@@ -266,11 +282,24 @@ optional_policy(` ') optional_policy(` @@ -63645,7 +63959,7 @@ index 2dad3c8..cf94c2b 100644 ') optional_policy(` -@@ -284,6 +325,15 @@ optional_policy(` +@@ -284,6 +313,15 @@ optional_policy(` ') optional_policy(` @@ -63661,7 +63975,7 @@ index 2dad3c8..cf94c2b 100644 unconfined_shell_domtrans(sshd_t) ') -@@ -292,26 +342,26 @@ optional_policy(` +@@ -292,26 +330,26 @@ optional_policy(` ') ifdef(`TODO',` @@ -63707,7 +64021,7 @@ index 2dad3c8..cf94c2b 100644 ') dnl endif TODO ######################################## -@@ -322,19 +372,26 @@ tunable_policy(`ssh_sysadm_login',` +@@ -322,19 +360,26 @@ tunable_policy(`ssh_sysadm_login',` # ssh_keygen_t is the type of the ssh-keygen program when run at install time # and by sysadm_t @@ -63735,7 +64049,7 @@ index 2dad3c8..cf94c2b 100644 dev_read_urand(ssh_keygen_t) term_dontaudit_use_console(ssh_keygen_t) -@@ -351,9 +408,11 @@ auth_use_nsswitch(ssh_keygen_t) +@@ -351,9 +396,11 @@ auth_use_nsswitch(ssh_keygen_t) logging_send_syslog_msg(ssh_keygen_t) userdom_dontaudit_use_unpriv_user_fds(ssh_keygen_t) @@ -63749,7 +64063,7 @@ index 2dad3c8..cf94c2b 100644 ') optional_policy(` -@@ -363,3 +422,77 @@ optional_policy(` +@@ -363,3 +410,77 @@ optional_policy(` optional_policy(` udev_read_db(ssh_keygen_t) ') @@ -64599,7 +64913,7 @@ index 54b8605..a04f013 100644 admin_pattern($1, tuned_var_run_t) ') diff --git a/policy/modules/services/tuned.te b/policy/modules/services/tuned.te -index db9d2a5..1aebd23 100644 +index db9d2a5..7f1a022 100644 --- a/policy/modules/services/tuned.te +++ b/policy/modules/services/tuned.te @@ -24,6 +24,7 @@ files_pid_file(tuned_var_run_t) @@ -64619,7 +64933,16 @@ index db9d2a5..1aebd23 100644 # to allow cpu tuning dev_rw_netcontrol(tuned_t) -@@ -58,6 +59,10 @@ optional_policy(` +@@ -47,6 +48,8 @@ files_read_etc_files(tuned_t) + files_read_usr_files(tuned_t) + files_dontaudit_search_home(tuned_t) + ++auth_use_nsswitch(tuned_t) ++ + logging_send_syslog_msg(tuned_t) + + miscfiles_read_localization(tuned_t) +@@ -58,6 +61,10 @@ optional_policy(` fstools_domtrans(tuned_t) ') @@ -68682,7 +69005,7 @@ index 130ced9..51e7627 100644 + userdom_admin_home_dir_filetrans($1, user_fonts_cache_t, dir, ".fontconfig") +') diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te -index 143c893..a3e787d 100644 +index 143c893..163158e 100644 --- a/policy/modules/services/xserver.te +++ b/policy/modules/services/xserver.te @@ -26,27 +26,50 @@ gen_require(` @@ -68996,17 +69319,13 @@ index 143c893..a3e787d 100644 ') optional_policy(` -@@ -305,19 +396,40 @@ optional_policy(` +@@ -305,19 +396,36 @@ optional_policy(` # allow xdm_t self:capability { setgid setuid sys_resource kill sys_tty_config mknod chown dac_override dac_read_search fowner fsetid ipc_owner sys_nice sys_rawio net_bind_service }; -allow xdm_t self:process { setexec setpgid getsched setsched setrlimit signal_perms setkeycreate }; + +allow xdm_t self:process { setexec setpgid getattr getcap setcap getsched getsession setsched setrlimit signal_perms setkeycreate }; -+tunable_policy(`deny_ptrace',`',` -+ allow xdm_t self:process ptrace; -+') -+ allow xdm_t self:fifo_file rw_fifo_file_perms; allow xdm_t self:shm create_shm_perms; allow xdm_t self:sem create_sem_perms; @@ -69040,7 +69359,7 @@ index 143c893..a3e787d 100644 # Allow gdm to run gdm-binary can_exec(xdm_t, xdm_exec_t) -@@ -325,43 +437,63 @@ can_exec(xdm_t, xdm_exec_t) +@@ -325,43 +433,63 @@ can_exec(xdm_t, xdm_exec_t) allow xdm_t xdm_lock_t:file manage_file_perms; files_lock_filetrans(xdm_t, xdm_lock_t, file) @@ -69110,7 +69429,7 @@ index 143c893..a3e787d 100644 # connect to xdm xserver over stream socket stream_connect_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t, xserver_t) -@@ -370,18 +502,26 @@ stream_connect_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t, xserver_t) +@@ -370,18 +498,26 @@ stream_connect_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t, xserver_t) delete_files_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t) delete_sock_files_pattern(xdm_t, xserver_tmp_t, xserver_tmp_t) @@ -69138,7 +69457,7 @@ index 143c893..a3e787d 100644 corenet_all_recvfrom_unlabeled(xdm_t) corenet_all_recvfrom_netlabel(xdm_t) -@@ -393,38 +533,49 @@ corenet_tcp_sendrecv_all_ports(xdm_t) +@@ -393,38 +529,48 @@ corenet_tcp_sendrecv_all_ports(xdm_t) corenet_udp_sendrecv_all_ports(xdm_t) corenet_tcp_bind_generic_node(xdm_t) corenet_udp_bind_generic_node(xdm_t) @@ -69186,13 +69505,12 @@ index 143c893..a3e787d 100644 domain_use_interactive_fds(xdm_t) # Do not audit denied probes of /proc. domain_dontaudit_read_all_domains_state(xdm_t) -+domain_dontaudit_ptrace_all_domains(xdm_t) +domain_dontaudit_signal_all_domains(xdm_t) +domain_dontaudit_getattr_all_entry_files(xdm_t) files_read_etc_files(xdm_t) files_read_var_files(xdm_t) -@@ -435,9 +586,25 @@ files_list_mnt(xdm_t) +@@ -435,9 +581,25 @@ files_list_mnt(xdm_t) files_read_usr_files(xdm_t) # Poweroff wants to create the /poweroff file when run from xdm files_create_boot_flag(xdm_t) @@ -69218,7 +69536,7 @@ index 143c893..a3e787d 100644 storage_dontaudit_read_fixed_disk(xdm_t) storage_dontaudit_write_fixed_disk(xdm_t) -@@ -446,28 +613,37 @@ storage_dontaudit_raw_read_removable_device(xdm_t) +@@ -446,28 +608,37 @@ storage_dontaudit_raw_read_removable_device(xdm_t) storage_dontaudit_raw_write_removable_device(xdm_t) storage_dontaudit_setattr_removable_dev(xdm_t) storage_dontaudit_rw_scsi_generic(xdm_t) @@ -69258,7 +69576,7 @@ index 143c893..a3e787d 100644 userdom_dontaudit_use_unpriv_user_fds(xdm_t) userdom_create_all_users_keys(xdm_t) -@@ -476,24 +652,43 @@ userdom_read_user_home_content_files(xdm_t) +@@ -476,24 +647,43 @@ userdom_read_user_home_content_files(xdm_t) # Search /proc for any user domain processes. userdom_read_all_users_state(xdm_t) userdom_signal_all_users(xdm_t) @@ -69308,7 +69626,7 @@ index 143c893..a3e787d 100644 tunable_policy(`xdm_sysadm_login',` userdom_xsession_spec_domtrans_all_users(xdm_t) # FIXME: -@@ -507,11 +702,21 @@ tunable_policy(`xdm_sysadm_login',` +@@ -507,11 +697,21 @@ tunable_policy(`xdm_sysadm_login',` ') optional_policy(` @@ -69330,7 +69648,7 @@ index 143c893..a3e787d 100644 ') optional_policy(` -@@ -519,12 +724,63 @@ optional_policy(` +@@ -519,12 +719,63 @@ optional_policy(` ') optional_policy(` @@ -69394,7 +69712,7 @@ index 143c893..a3e787d 100644 hostname_exec(xdm_t) ') -@@ -542,28 +798,69 @@ optional_policy(` +@@ -542,28 +793,69 @@ optional_policy(` ') optional_policy(` @@ -69473,7 +69791,7 @@ index 143c893..a3e787d 100644 ') optional_policy(` -@@ -575,6 +872,14 @@ optional_policy(` +@@ -575,6 +867,14 @@ optional_policy(` ') optional_policy(` @@ -69488,7 +69806,7 @@ index 143c893..a3e787d 100644 xfs_stream_connect(xdm_t) ') -@@ -600,6 +905,7 @@ allow xserver_t input_xevent_t:x_event send; +@@ -600,6 +900,7 @@ allow xserver_t input_xevent_t:x_event send; # NVIDIA Needs execstack allow xserver_t self:capability { dac_override fowner fsetid setgid setuid ipc_owner sys_rawio sys_admin sys_nice sys_tty_config mknod net_bind_service }; @@ -69496,7 +69814,7 @@ index 143c893..a3e787d 100644 dontaudit xserver_t self:capability chown; allow xserver_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap }; allow xserver_t self:fd use; -@@ -613,8 +919,15 @@ allow xserver_t self:unix_dgram_socket { create_socket_perms sendto }; +@@ -613,8 +914,15 @@ allow xserver_t self:unix_dgram_socket { create_socket_perms sendto }; allow xserver_t self:unix_stream_socket { create_stream_socket_perms connectto }; allow xserver_t self:tcp_socket create_stream_socket_perms; allow xserver_t self:udp_socket create_socket_perms; @@ -69512,7 +69830,7 @@ index 143c893..a3e787d 100644 manage_dirs_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t) manage_files_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t) manage_sock_files_pattern(xserver_t, xserver_tmp_t, xserver_tmp_t) -@@ -633,12 +946,19 @@ manage_files_pattern(xserver_t, xkb_var_lib_t, xkb_var_lib_t) +@@ -633,12 +941,19 @@ manage_files_pattern(xserver_t, xkb_var_lib_t, xkb_var_lib_t) manage_lnk_files_pattern(xserver_t, xkb_var_lib_t, xkb_var_lib_t) files_search_var_lib(xserver_t) @@ -69534,7 +69852,7 @@ index 143c893..a3e787d 100644 kernel_read_system_state(xserver_t) kernel_read_device_sysctls(xserver_t) -@@ -646,6 +966,7 @@ kernel_read_modprobe_sysctls(xserver_t) +@@ -646,6 +961,7 @@ kernel_read_modprobe_sysctls(xserver_t) # Xorg wants to check if kernel is tainted kernel_read_kernel_sysctls(xserver_t) kernel_write_proc_files(xserver_t) @@ -69542,7 +69860,7 @@ index 143c893..a3e787d 100644 # Run helper programs in xserver_t. corecmd_exec_bin(xserver_t) -@@ -672,21 +993,28 @@ dev_rw_apm_bios(xserver_t) +@@ -672,21 +988,28 @@ dev_rw_apm_bios(xserver_t) dev_rw_agp(xserver_t) dev_rw_framebuffer(xserver_t) dev_manage_dri_dev(xserver_t) @@ -69573,7 +69891,7 @@ index 143c893..a3e787d 100644 # brought on by rhgb files_search_mnt(xserver_t) -@@ -697,8 +1025,13 @@ fs_getattr_xattr_fs(xserver_t) +@@ -697,8 +1020,13 @@ fs_getattr_xattr_fs(xserver_t) fs_search_nfs(xserver_t) fs_search_auto_mountpoints(xserver_t) fs_search_ramfs(xserver_t) @@ -69587,7 +69905,7 @@ index 143c893..a3e787d 100644 selinux_validate_context(xserver_t) selinux_compute_access_vector(xserver_t) -@@ -711,8 +1044,6 @@ init_getpgid(xserver_t) +@@ -711,8 +1039,6 @@ init_getpgid(xserver_t) term_setattr_unallocated_ttys(xserver_t) term_use_unallocated_ttys(xserver_t) @@ -69596,7 +69914,7 @@ index 143c893..a3e787d 100644 locallogin_use_fds(xserver_t) logging_send_syslog_msg(xserver_t) -@@ -720,11 +1051,12 @@ logging_send_audit_msgs(xserver_t) +@@ -720,11 +1046,12 @@ logging_send_audit_msgs(xserver_t) miscfiles_read_localization(xserver_t) miscfiles_read_fonts(xserver_t) @@ -69611,7 +69929,7 @@ index 143c893..a3e787d 100644 userdom_search_user_home_dirs(xserver_t) userdom_use_user_ttys(xserver_t) -@@ -778,16 +1110,40 @@ optional_policy(` +@@ -778,16 +1105,40 @@ optional_policy(` ') optional_policy(` @@ -69653,7 +69971,7 @@ index 143c893..a3e787d 100644 unconfined_domtrans(xserver_t) ') -@@ -796,6 +1152,10 @@ optional_policy(` +@@ -796,6 +1147,10 @@ optional_policy(` ') optional_policy(` @@ -69664,7 +69982,7 @@ index 143c893..a3e787d 100644 xfs_stream_connect(xserver_t) ') -@@ -811,10 +1171,10 @@ allow xserver_t xdm_t:shm rw_shm_perms; +@@ -811,10 +1166,10 @@ allow xserver_t xdm_t:shm rw_shm_perms; # NB we do NOT allow xserver_t xdm_var_lib_t:dir, only access to an open # handle of a file inside the dir!!! @@ -69678,7 +69996,7 @@ index 143c893..a3e787d 100644 # Label pid and temporary files with derived types. manage_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) -@@ -822,7 +1182,7 @@ manage_lnk_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) +@@ -822,7 +1177,7 @@ manage_lnk_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) manage_sock_files_pattern(xserver_t, xdm_tmp_t, xdm_tmp_t) # Run xkbcomp. @@ -69687,7 +70005,7 @@ index 143c893..a3e787d 100644 can_exec(xserver_t, xkb_var_lib_t) # VNC v4 module in X server -@@ -835,26 +1195,21 @@ init_use_fds(xserver_t) +@@ -835,26 +1190,21 @@ init_use_fds(xserver_t) # to read ROLE_home_t - examine this in more detail # (xauth?) userdom_read_user_home_content_files(xserver_t) @@ -69722,7 +70040,7 @@ index 143c893..a3e787d 100644 ') optional_policy(` -@@ -862,6 +1217,10 @@ optional_policy(` +@@ -862,6 +1212,10 @@ optional_policy(` rhgb_rw_tmpfs_files(xserver_t) ') @@ -69733,7 +70051,7 @@ index 143c893..a3e787d 100644 ######################################## # # Rules common to all X window domains -@@ -905,7 +1264,7 @@ allow x_domain xproperty_t:x_property { getattr create read write append destroy +@@ -905,7 +1259,7 @@ allow x_domain xproperty_t:x_property { getattr create read write append destroy allow x_domain root_xdrawable_t:x_drawable { getattr setattr list_child add_child remove_child send receive hide show }; # operations allowed on my windows allow x_domain self:x_drawable { create destroy getattr setattr read write show hide list_child add_child remove_child manage send receive }; @@ -69742,7 +70060,7 @@ index 143c893..a3e787d 100644 # operations allowed on all windows allow x_domain x_domain:x_drawable { getattr get_property set_property remove_child }; -@@ -959,11 +1318,31 @@ allow x_domain self:x_resource { read write }; +@@ -959,11 +1313,31 @@ allow x_domain self:x_resource { read write }; # can mess with the screensaver allow x_domain xserver_t:x_screen { getattr saver_getattr }; @@ -69774,7 +70092,7 @@ index 143c893..a3e787d 100644 tunable_policy(`! xserver_object_manager',` # should be xserver_unconfined(x_domain), # but typeattribute doesnt work in conditionals -@@ -985,18 +1364,31 @@ tunable_policy(`! xserver_object_manager',` +@@ -985,18 +1359,31 @@ tunable_policy(`! xserver_object_manager',` allow x_domain xevent_type:{ x_event x_synthetic_event } *; ') @@ -69914,7 +70232,7 @@ index c9981d1..75a7d17 100644 init_labeled_script_domtrans($1, zabbix_initrc_exec_t) domain_system_change_exemption($1) diff --git a/policy/modules/services/zabbix.te b/policy/modules/services/zabbix.te -index 7f88f5f..4d704e8 100644 +index 7f88f5f..7d8a06e 100644 --- a/policy/modules/services/zabbix.te +++ b/policy/modules/services/zabbix.te @@ -5,6 +5,13 @@ policy_module(zabbix, 1.3.1) @@ -69972,7 +70290,7 @@ index 7f88f5f..4d704e8 100644 # shared memory rw_files_pattern(zabbix_t, zabbix_tmpfs_t, zabbix_tmpfs_t) fs_tmpfs_filetrans(zabbix_t, zabbix_tmpfs_t, file) -@@ -58,25 +75,53 @@ manage_dirs_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t) +@@ -58,25 +75,55 @@ manage_dirs_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t) manage_files_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t) files_pid_filetrans(zabbix_t, zabbix_var_run_t, { dir file }) @@ -69984,8 +70302,10 @@ index 7f88f5f..4d704e8 100644 + corenet_tcp_bind_generic_node(zabbix_t) corenet_tcp_bind_zabbix_port(zabbix_t) -+#needed by zabbix-server-mysql ++# needed by zabbix-server-mysql +corenet_tcp_connect_http_port(zabbix_t) ++# to monitor ftp urls ++corenet_tcp_connect_ftp_port(zabbix_t) + +dev_read_urand(zabbix_t) @@ -70001,8 +70321,8 @@ index 7f88f5f..4d704e8 100644 zabbix_agent_tcp_connect(zabbix_t) +tunable_policy(`zabbix_can_network',` -+ corenet_tcp_connect_all_unreserved_ports(zabbix_t) -+ corenet_tcp_connect_all_ephemeral_ports(zabbix_t) ++ corenet_tcp_connect_all_unreserved_ports(zabbix_t) ++ corenet_tcp_connect_all_ephemeral_ports(zabbix_t) +') + optional_policy(` @@ -70028,7 +70348,7 @@ index 7f88f5f..4d704e8 100644 ######################################## # # zabbix agent local policy -@@ -134,3 +179,4 @@ sysnet_dns_name_resolve(zabbix_agent_t) +@@ -134,3 +181,4 @@ sysnet_dns_name_resolve(zabbix_agent_t) # Network access to zabbix server zabbix_tcp_connect(zabbix_agent_t) @@ -73194,7 +73514,7 @@ index 94fd8dd..5a52670 100644 + read_fifo_files_pattern($1, init_var_run_t, init_var_run_t) +') diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te -index 29a9565..2a26b46 100644 +index 29a9565..26fe806 100644 --- a/policy/modules/system/init.te +++ b/policy/modules/system/init.te @@ -16,6 +16,34 @@ gen_require(` @@ -73634,7 +73954,7 @@ index 29a9565..2a26b46 100644 dev_delete_lvm_control_dev(initrc_t) dev_manage_generic_symlinks(initrc_t) dev_manage_generic_files(initrc_t) -@@ -298,13 +520,13 @@ dev_manage_generic_files(initrc_t) +@@ -298,17 +520,16 @@ dev_manage_generic_files(initrc_t) dev_delete_generic_symlinks(initrc_t) dev_getattr_all_blk_files(initrc_t) dev_getattr_all_chr_files(initrc_t) @@ -73650,7 +73970,11 @@ index 29a9565..2a26b46 100644 domain_sigchld_all_domains(initrc_t) domain_read_all_domains_state(initrc_t) domain_getattr_all_domains(initrc_t) -@@ -316,6 +538,7 @@ domain_dontaudit_getattr_all_udp_sockets(initrc_t) +-domain_dontaudit_ptrace_all_domains(initrc_t) + domain_getsession_all_domains(initrc_t) + domain_use_interactive_fds(initrc_t) + # for lsof which is used by alsa shutdown: +@@ -316,6 +537,7 @@ domain_dontaudit_getattr_all_udp_sockets(initrc_t) domain_dontaudit_getattr_all_tcp_sockets(initrc_t) domain_dontaudit_getattr_all_dgram_sockets(initrc_t) domain_dontaudit_getattr_all_pipes(initrc_t) @@ -73658,7 +73982,7 @@ index 29a9565..2a26b46 100644 files_getattr_all_dirs(initrc_t) files_getattr_all_files(initrc_t) -@@ -323,8 +546,10 @@ files_getattr_all_symlinks(initrc_t) +@@ -323,8 +545,10 @@ files_getattr_all_symlinks(initrc_t) files_getattr_all_pipes(initrc_t) files_getattr_all_sockets(initrc_t) files_purge_tmp(initrc_t) @@ -73670,7 +73994,7 @@ index 29a9565..2a26b46 100644 files_delete_all_pids(initrc_t) files_delete_all_pid_dirs(initrc_t) files_read_etc_files(initrc_t) -@@ -340,8 +565,12 @@ files_list_isid_type_dirs(initrc_t) +@@ -340,8 +564,12 @@ files_list_isid_type_dirs(initrc_t) files_mounton_isid_type_dirs(initrc_t) files_list_default(initrc_t) files_mounton_default(initrc_t) @@ -73684,7 +74008,7 @@ index 29a9565..2a26b46 100644 fs_list_inotifyfs(initrc_t) fs_register_binary_executable_type(initrc_t) # rhgb-console writes to ramfs -@@ -351,8 +580,12 @@ fs_mount_all_fs(initrc_t) +@@ -351,9 +579,12 @@ fs_mount_all_fs(initrc_t) fs_unmount_all_fs(initrc_t) fs_remount_all_fs(initrc_t) fs_getattr_all_fs(initrc_t) @@ -73692,12 +74016,13 @@ index 29a9565..2a26b46 100644 +fs_getattr_nfsd_files(initrc_t) # initrc_t needs to do a pidof which requires ptrace +-mcs_ptrace_all(initrc_t) +mcs_file_read_all(initrc_t) +mcs_file_write_all(initrc_t) - mcs_ptrace_all(initrc_t) mcs_killall(initrc_t) mcs_process_set_categories(initrc_t) -@@ -363,6 +596,7 @@ mls_process_read_up(initrc_t) + +@@ -363,6 +594,7 @@ mls_process_read_up(initrc_t) mls_process_write_down(initrc_t) mls_rangetrans_source(initrc_t) mls_fd_share_all_levels(initrc_t) @@ -73705,7 +74030,7 @@ index 29a9565..2a26b46 100644 selinux_get_enforce_mode(initrc_t) -@@ -374,6 +608,7 @@ term_use_all_terms(initrc_t) +@@ -374,6 +606,7 @@ term_use_all_terms(initrc_t) term_reset_tty_labels(initrc_t) auth_rw_login_records(initrc_t) @@ -73713,7 +74038,7 @@ index 29a9565..2a26b46 100644 auth_setattr_login_records(initrc_t) auth_rw_lastlog(initrc_t) auth_read_pam_pid(initrc_t) -@@ -394,18 +629,17 @@ logging_read_audit_config(initrc_t) +@@ -394,18 +627,17 @@ logging_read_audit_config(initrc_t) miscfiles_read_localization(initrc_t) # slapd needs to read cert files from its initscript @@ -73735,7 +74060,7 @@ index 29a9565..2a26b46 100644 ifdef(`distro_debian',` dev_setattr_generic_dirs(initrc_t) -@@ -458,6 +692,10 @@ ifdef(`distro_gentoo',` +@@ -458,6 +690,10 @@ ifdef(`distro_gentoo',` sysnet_setattr_config(initrc_t) optional_policy(` @@ -73746,7 +74071,7 @@ index 29a9565..2a26b46 100644 alsa_read_lib(initrc_t) ') -@@ -478,7 +716,7 @@ ifdef(`distro_redhat',` +@@ -478,7 +714,7 @@ ifdef(`distro_redhat',` # Red Hat systems seem to have a stray # fd open from the initrd @@ -73755,7 +74080,7 @@ index 29a9565..2a26b46 100644 files_dontaudit_read_root_files(initrc_t) # These seem to be from the initrd -@@ -493,6 +731,7 @@ ifdef(`distro_redhat',` +@@ -493,6 +729,7 @@ ifdef(`distro_redhat',` files_create_boot_dirs(initrc_t) files_create_boot_flag(initrc_t) files_rw_boot_symlinks(initrc_t) @@ -73763,7 +74088,7 @@ index 29a9565..2a26b46 100644 # wants to read /.fonts directory files_read_default_files(initrc_t) files_mountpoint(initrc_tmp_t) -@@ -522,8 +761,35 @@ ifdef(`distro_redhat',` +@@ -522,8 +759,35 @@ ifdef(`distro_redhat',` ') optional_policy(` @@ -73799,7 +74124,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -531,10 +797,22 @@ ifdef(`distro_redhat',` +@@ -531,10 +795,22 @@ ifdef(`distro_redhat',` rpc_write_exports(initrc_t) rpc_manage_nfs_state_data(initrc_t) ') @@ -73822,7 +74147,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -549,6 +827,39 @@ ifdef(`distro_suse',` +@@ -549,6 +825,39 @@ ifdef(`distro_suse',` ') ') @@ -73862,7 +74187,7 @@ index 29a9565..2a26b46 100644 optional_policy(` amavis_search_lib(initrc_t) amavis_setattr_pid_files(initrc_t) -@@ -561,6 +872,8 @@ optional_policy(` +@@ -561,6 +870,8 @@ optional_policy(` optional_policy(` apache_read_config(initrc_t) apache_list_modules(initrc_t) @@ -73871,7 +74196,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -577,6 +890,7 @@ optional_policy(` +@@ -577,6 +888,7 @@ optional_policy(` optional_policy(` cgroup_stream_connect_cgred(initrc_t) @@ -73879,7 +74204,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -589,6 +903,17 @@ optional_policy(` +@@ -589,6 +901,17 @@ optional_policy(` ') optional_policy(` @@ -73897,7 +74222,7 @@ index 29a9565..2a26b46 100644 dev_getattr_printer_dev(initrc_t) cups_read_log(initrc_t) -@@ -605,9 +930,13 @@ optional_policy(` +@@ -605,9 +928,13 @@ optional_policy(` dbus_connect_system_bus(initrc_t) dbus_system_bus_client(initrc_t) dbus_read_config(initrc_t) @@ -73911,7 +74236,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -632,6 +961,10 @@ optional_policy(` +@@ -632,6 +959,10 @@ optional_policy(` ') optional_policy(` @@ -73922,7 +74247,7 @@ index 29a9565..2a26b46 100644 gpm_setattr_gpmctl(initrc_t) ') -@@ -649,6 +982,11 @@ optional_policy(` +@@ -649,6 +980,11 @@ optional_policy(` ') optional_policy(` @@ -73934,7 +74259,7 @@ index 29a9565..2a26b46 100644 inn_exec_config(initrc_t) ') -@@ -689,6 +1027,7 @@ optional_policy(` +@@ -689,6 +1025,7 @@ optional_policy(` lpd_list_spool(initrc_t) lpd_read_config(initrc_t) @@ -73942,7 +74267,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -706,7 +1045,13 @@ optional_policy(` +@@ -706,7 +1043,13 @@ optional_policy(` ') optional_policy(` @@ -73956,7 +74281,7 @@ index 29a9565..2a26b46 100644 mta_dontaudit_read_spool_symlinks(initrc_t) ') -@@ -729,6 +1074,10 @@ optional_policy(` +@@ -729,6 +1072,10 @@ optional_policy(` ') optional_policy(` @@ -73967,7 +74292,7 @@ index 29a9565..2a26b46 100644 postgresql_manage_db(initrc_t) postgresql_read_config(initrc_t) ') -@@ -738,10 +1087,20 @@ optional_policy(` +@@ -738,10 +1085,20 @@ optional_policy(` ') optional_policy(` @@ -73988,7 +74313,7 @@ index 29a9565..2a26b46 100644 quota_manage_flags(initrc_t) ') -@@ -750,6 +1109,10 @@ optional_policy(` +@@ -750,6 +1107,10 @@ optional_policy(` ') optional_policy(` @@ -73999,7 +74324,7 @@ index 29a9565..2a26b46 100644 fs_write_ramfs_sockets(initrc_t) fs_search_ramfs(initrc_t) -@@ -771,8 +1134,6 @@ optional_policy(` +@@ -771,8 +1132,6 @@ optional_policy(` # bash tries ioctl for some reason files_dontaudit_ioctl_all_pids(initrc_t) @@ -74008,7 +74333,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -781,6 +1142,10 @@ optional_policy(` +@@ -781,6 +1140,10 @@ optional_policy(` ') optional_policy(` @@ -74019,7 +74344,7 @@ index 29a9565..2a26b46 100644 # shorewall-init script run /var/lib/shorewall/firewall shorewall_lib_domtrans(initrc_t) ') -@@ -790,10 +1155,12 @@ optional_policy(` +@@ -790,10 +1153,12 @@ optional_policy(` squid_manage_logs(initrc_t) ') @@ -74032,7 +74357,7 @@ index 29a9565..2a26b46 100644 optional_policy(` ssh_dontaudit_read_server_keys(initrc_t) -@@ -805,7 +1172,6 @@ optional_policy(` +@@ -805,7 +1170,6 @@ optional_policy(` ') optional_policy(` @@ -74040,7 +74365,7 @@ index 29a9565..2a26b46 100644 udev_manage_pid_files(initrc_t) udev_manage_rules_files(initrc_t) ') -@@ -815,11 +1181,26 @@ optional_policy(` +@@ -815,11 +1179,25 @@ optional_policy(` ') optional_policy(` @@ -74062,13 +74387,12 @@ index 29a9565..2a26b46 100644 + mcs_file_write_all(initrc_t) + mcs_socket_write_all_levels(initrc_t) + mcs_killall(initrc_t) -+ mcs_ptrace_all(initrc_t) + + files_tmp_filetrans(initrc_t, initrc_tmp_t, { dir_file_class_set }) ifdef(`distro_redhat',` # system-config-services causes avc messages that should be dontaudited -@@ -829,6 +1210,18 @@ optional_policy(` +@@ -829,6 +1207,18 @@ optional_policy(` optional_policy(` mono_domtrans(initrc_t) ') @@ -74087,7 +74411,7 @@ index 29a9565..2a26b46 100644 ') optional_policy(` -@@ -844,6 +1237,10 @@ optional_policy(` +@@ -844,6 +1234,10 @@ optional_policy(` ') optional_policy(` @@ -74098,7 +74422,7 @@ index 29a9565..2a26b46 100644 # Set device ownerships/modes. xserver_setattr_console_pipes(initrc_t) -@@ -854,3 +1251,161 @@ optional_policy(` +@@ -854,3 +1248,161 @@ optional_policy(` optional_policy(` zebra_read_config(initrc_t) ') @@ -75316,7 +75640,7 @@ index 808ba93..4ff705d 100644 + files_etc_filetrans($1, ld_so_cache_t, file, "ld.so.preload~") +') diff --git a/policy/modules/system/libraries.te b/policy/modules/system/libraries.te -index e5836d3..eae9427 100644 +index e5836d3..cc8dabb 100644 --- a/policy/modules/system/libraries.te +++ b/policy/modules/system/libraries.te @@ -61,7 +61,7 @@ allow ldconfig_t self:capability { dac_override sys_chroot }; @@ -75328,7 +75652,14 @@ index e5836d3..eae9427 100644 files_etc_filetrans(ldconfig_t, ld_so_cache_t, file) manage_dirs_pattern(ldconfig_t, ldconfig_tmp_t, ldconfig_tmp_t) -@@ -79,6 +79,7 @@ corecmd_search_bin(ldconfig_t) +@@ -75,10 +75,14 @@ kernel_read_system_state(ldconfig_t) + + fs_getattr_xattr_fs(ldconfig_t) + ++files_list_var_lib(ldconfig_t) ++files_manage_var_lib_symlinks(ldconfig_t) ++ + corecmd_search_bin(ldconfig_t) domain_use_interactive_fds(ldconfig_t) @@ -75336,7 +75667,7 @@ index e5836d3..eae9427 100644 files_search_var_lib(ldconfig_t) files_read_etc_files(ldconfig_t) files_read_usr_files(ldconfig_t) -@@ -94,7 +95,8 @@ miscfiles_read_localization(ldconfig_t) +@@ -94,7 +98,8 @@ miscfiles_read_localization(ldconfig_t) logging_send_syslog_msg(ldconfig_t) @@ -75346,7 +75677,7 @@ index e5836d3..eae9427 100644 userdom_use_all_users_fds(ldconfig_t) ifdef(`distro_ubuntu',` -@@ -103,6 +105,12 @@ ifdef(`distro_ubuntu',` +@@ -103,6 +108,12 @@ ifdef(`distro_ubuntu',` ') ') @@ -75359,7 +75690,7 @@ index e5836d3..eae9427 100644 ifdef(`hide_broken_symptoms',` ifdef(`distro_gentoo',` # leaked fds from portage -@@ -114,6 +122,9 @@ ifdef(`hide_broken_symptoms',` +@@ -114,6 +125,9 @@ ifdef(`hide_broken_symptoms',` ') ') @@ -75369,7 +75700,7 @@ index e5836d3..eae9427 100644 optional_policy(` unconfined_dontaudit_rw_tcp_sockets(ldconfig_t) ') -@@ -131,6 +142,10 @@ optional_policy(` +@@ -131,6 +145,10 @@ optional_policy(` ') optional_policy(` @@ -75380,7 +75711,7 @@ index e5836d3..eae9427 100644 puppet_rw_tmp(ldconfig_t) ') -@@ -141,6 +156,3 @@ optional_policy(` +@@ -141,6 +159,3 @@ optional_policy(` rpm_manage_script_tmp_files(ldconfig_t) ') @@ -75944,10 +76275,10 @@ index 831b909..118f708 100644 init_labeled_script_domtrans($1, syslogd_initrc_exec_t) domain_system_change_exemption($1) diff --git a/policy/modules/system/logging.te b/policy/modules/system/logging.te -index b6ec597..dc551f4 100644 +index b6ec597..709fc74 100644 --- a/policy/modules/system/logging.te +++ b/policy/modules/system/logging.te -@@ -5,6 +5,13 @@ policy_module(logging, 1.17.2) +@@ -5,6 +5,20 @@ policy_module(logging, 1.17.2) # Declarations # @@ -75958,10 +76289,17 @@ index b6ec597..dc551f4 100644 +##
++## Allow syslogd the ability to read/write terminals ++##
++##