++##
++## Determine whether Nagios, NRPE can
++## access nfs file systems.
++##
++##
++gen_tunable(nagios_use_nfs, false)
++
+gen_require(`
+ class passwd rootok;
+ class passwd passwd;
@@ -60060,7 +60086,7 @@ index 7b3e682e6..3b5f4e6ec 100644
attribute nagios_plugin_domain;
type nagios_t;
-@@ -27,7 +46,7 @@ type nagios_var_run_t;
+@@ -27,7 +54,7 @@ type nagios_var_run_t;
files_pid_file(nagios_var_run_t)
type nagios_spool_t;
@@ -60069,7 +60095,7 @@ index 7b3e682e6..3b5f4e6ec 100644
type nagios_var_lib_t;
files_type(nagios_var_lib_t)
-@@ -39,6 +58,7 @@ nagios_plugin_template(services)
+@@ -39,6 +66,7 @@ nagios_plugin_template(services)
nagios_plugin_template(system)
nagios_plugin_template(unconfined)
nagios_plugin_template(eventhandler)
@@ -60077,7 +60103,7 @@ index 7b3e682e6..3b5f4e6ec 100644
type nagios_eventhandler_plugin_tmp_t;
files_tmp_file(nagios_eventhandler_plugin_tmp_t)
-@@ -46,6 +66,9 @@ files_tmp_file(nagios_eventhandler_plugin_tmp_t)
+@@ -46,6 +74,9 @@ files_tmp_file(nagios_eventhandler_plugin_tmp_t)
type nagios_system_plugin_tmp_t;
files_tmp_file(nagios_system_plugin_tmp_t)
@@ -60087,7 +60113,7 @@ index 7b3e682e6..3b5f4e6ec 100644
type nrpe_t;
type nrpe_exec_t;
init_daemon_domain(nrpe_t, nrpe_exec_t)
-@@ -63,30 +86,33 @@ files_pid_file(nrpe_var_run_t)
+@@ -63,30 +94,33 @@ files_pid_file(nrpe_var_run_t)
allow nagios_plugin_domain self:fifo_file rw_fifo_file_perms;
@@ -60129,7 +60155,7 @@ index 7b3e682e6..3b5f4e6ec 100644
allow nagios_t nagios_plugin_domain:process signal_perms;
-@@ -96,11 +122,13 @@ allow nagios_t nagios_etc_t:dir list_dir_perms;
+@@ -96,11 +130,13 @@ allow nagios_t nagios_etc_t:dir list_dir_perms;
allow nagios_t nagios_etc_t:file read_file_perms;
allow nagios_t nagios_etc_t:lnk_file read_lnk_file_perms;
@@ -60148,7 +60174,7 @@ index 7b3e682e6..3b5f4e6ec 100644
manage_dirs_pattern(nagios_t, nagios_tmp_t, nagios_tmp_t)
manage_files_pattern(nagios_t, nagios_tmp_t, nagios_tmp_t)
-@@ -110,11 +138,14 @@ manage_files_pattern(nagios_t, nagios_var_run_t, nagios_var_run_t)
+@@ -110,11 +146,14 @@ manage_files_pattern(nagios_t, nagios_var_run_t, nagios_var_run_t)
files_pid_filetrans(nagios_t, nagios_var_run_t, file)
manage_fifo_files_pattern(nagios_t, nagios_spool_t, nagios_spool_t)
@@ -60165,7 +60191,7 @@ index 7b3e682e6..3b5f4e6ec 100644
kernel_read_system_state(nagios_t)
kernel_read_kernel_sysctls(nagios_t)
-@@ -123,7 +154,6 @@ kernel_read_software_raid_state(nagios_t)
+@@ -123,7 +162,6 @@ kernel_read_software_raid_state(nagios_t)
corecmd_exec_bin(nagios_t)
corecmd_exec_shell(nagios_t)
@@ -60173,7 +60199,7 @@ index 7b3e682e6..3b5f4e6ec 100644
corenet_all_recvfrom_netlabel(nagios_t)
corenet_tcp_sendrecv_generic_if(nagios_t)
corenet_tcp_sendrecv_generic_node(nagios_t)
-@@ -143,18 +173,16 @@ domain_read_all_domains_state(nagios_t)
+@@ -143,18 +181,16 @@ domain_read_all_domains_state(nagios_t)
files_read_etc_runtime_files(nagios_t)
files_read_kernel_symbol_table(nagios_t)
@@ -60193,7 +60219,7 @@ index 7b3e682e6..3b5f4e6ec 100644
userdom_dontaudit_use_unpriv_user_fds(nagios_t)
userdom_dontaudit_search_user_home_dirs(nagios_t)
-@@ -162,6 +190,41 @@ mta_send_mail(nagios_t)
+@@ -162,6 +198,47 @@ mta_send_mail(nagios_t)
mta_signal_system_mail(nagios_t)
mta_kill_system_mail(nagios_t)
@@ -60232,10 +60258,16 @@ index 7b3e682e6..3b5f4e6ec 100644
+ allow nagios_t nagios_log_t:file execute;
+')
+
++tunable_policy(`nagios_use_nfs',`
++ fs_manage_nfs_files(nagios_t)
++ fs_manage_nfs_dirs(nagios_t)
++ fs_manage_nfs_symlinks(nagios_t)
++')
++
optional_policy(`
netutils_kill_ping(nagios_t)
')
-@@ -178,35 +241,37 @@ optional_policy(`
+@@ -178,35 +255,38 @@ optional_policy(`
#
# CGI local policy
#
@@ -60267,6 +60299,7 @@ index 7b3e682e6..3b5f4e6ec 100644
- rw_fifo_files_pattern(httpd_nagios_script_t, nagios_spool_t, nagios_spool_t)
+ files_search_spool(nagios_script_t)
+ rw_fifo_files_pattern(nagios_script_t, nagios_spool_t, nagios_spool_t)
++ read_files_pattern(nagios_script_t, nagios_spool_t, nagios_spool_t)
- allow httpd_nagios_script_t nagios_log_t:dir list_dir_perms;
- read_files_pattern(httpd_nagios_script_t, nagios_etc_t, nagios_log_t)
@@ -60291,7 +60324,7 @@ index 7b3e682e6..3b5f4e6ec 100644
')
########################################
-@@ -214,7 +279,7 @@ optional_policy(`
+@@ -214,7 +294,7 @@ optional_policy(`
# Nrpe local policy
#
@@ -60300,7 +60333,7 @@ index 7b3e682e6..3b5f4e6ec 100644
dontaudit nrpe_t self:capability { sys_tty_config sys_resource };
allow nrpe_t self:process { setpgid signal_perms setsched setrlimit };
allow nrpe_t self:fifo_file rw_fifo_file_perms;
-@@ -229,9 +294,9 @@ files_pid_filetrans(nrpe_t, nrpe_var_run_t, file)
+@@ -229,9 +309,9 @@ files_pid_filetrans(nrpe_t, nrpe_var_run_t, file)
domtrans_pattern(nrpe_t, nagios_checkdisk_plugin_exec_t, nagios_checkdisk_plugin_t)
@@ -60311,7 +60344,7 @@ index 7b3e682e6..3b5f4e6ec 100644
corecmd_exec_bin(nrpe_t)
corecmd_exec_shell(nrpe_t)
-@@ -252,8 +317,8 @@ dev_read_urand(nrpe_t)
+@@ -252,8 +332,8 @@ dev_read_urand(nrpe_t)
domain_use_interactive_fds(nrpe_t)
domain_read_all_domains_state(nrpe_t)
@@ -60321,7 +60354,7 @@ index 7b3e682e6..3b5f4e6ec 100644
fs_getattr_all_fs(nrpe_t)
fs_search_auto_mountpoints(nrpe_t)
-@@ -262,10 +327,34 @@ auth_use_nsswitch(nrpe_t)
+@@ -262,10 +342,40 @@ auth_use_nsswitch(nrpe_t)
logging_send_syslog_msg(nrpe_t)
@@ -60355,10 +60388,16 @@ index 7b3e682e6..3b5f4e6ec 100644
+')
+
+
++tunable_policy(`nagios_use_nfs',`
++ fs_manage_nfs_files(nrpe_t)
++ fs_manage_nfs_dirs(nrpe_t)
++ fs_manage_nfs_symlinks(nrpe_t)
++')
++
optional_policy(`
inetd_tcp_service_domain(nrpe_t, nrpe_exec_t)
')
-@@ -309,16 +398,16 @@ files_getattr_all_file_type_fs(nagios_admin_plugin_t)
+@@ -309,16 +419,16 @@ files_getattr_all_file_type_fs(nagios_admin_plugin_t)
# Mail local policy
#
@@ -60379,7 +60418,7 @@ index 7b3e682e6..3b5f4e6ec 100644
logging_send_syslog_msg(nagios_mail_plugin_t)
sysnet_dns_name_resolve(nagios_mail_plugin_t)
-@@ -345,9 +434,14 @@ allow nagios_checkdisk_plugin_t self:capability { sys_admin sys_rawio };
+@@ -345,9 +455,14 @@ allow nagios_checkdisk_plugin_t self:capability { sys_admin sys_rawio };
kernel_read_software_raid_state(nagios_checkdisk_plugin_t)
@@ -60394,7 +60433,7 @@ index 7b3e682e6..3b5f4e6ec 100644
fs_getattr_all_fs(nagios_checkdisk_plugin_t)
storage_raw_read_fixed_disk(nagios_checkdisk_plugin_t)
-@@ -357,9 +451,11 @@ storage_raw_read_fixed_disk(nagios_checkdisk_plugin_t)
+@@ -357,9 +472,11 @@ storage_raw_read_fixed_disk(nagios_checkdisk_plugin_t)
# Services local policy
#
@@ -60408,7 +60447,7 @@ index 7b3e682e6..3b5f4e6ec 100644
corecmd_exec_bin(nagios_services_plugin_t)
-@@ -391,6 +487,11 @@ optional_policy(`
+@@ -391,6 +508,11 @@ optional_policy(`
optional_policy(`
mysql_stream_connect(nagios_services_plugin_t)
@@ -60420,7 +60459,7 @@ index 7b3e682e6..3b5f4e6ec 100644
')
optional_policy(`
-@@ -402,32 +503,40 @@ optional_policy(`
+@@ -402,32 +524,40 @@ optional_policy(`
# System local policy
#
@@ -60464,7 +60503,7 @@ index 7b3e682e6..3b5f4e6ec 100644
#######################################
#
# Event local policy
-@@ -442,9 +551,39 @@ corecmd_exec_shell(nagios_eventhandler_plugin_t)
+@@ -442,9 +572,39 @@ corecmd_exec_shell(nagios_eventhandler_plugin_t)
init_domtrans_script(nagios_eventhandler_plugin_t)
@@ -77293,7 +77332,7 @@ index ded95ec3a..210018ce4 100644
+ postfix_config_filetrans($1, postfix_prng_t, file, "prng_exch")
')
diff --git a/postfix.te b/postfix.te
-index 5cfb83eca..657a4346e 100644
+index 5cfb83eca..67f813d34 100644
--- a/postfix.te
+++ b/postfix.te
@@ -6,27 +6,23 @@ policy_module(postfix, 1.15.1)
@@ -78148,7 +78187,7 @@ index 5cfb83eca..657a4346e 100644
')
optional_policy(`
-@@ -774,31 +730,101 @@ optional_policy(`
+@@ -774,31 +730,102 @@ optional_policy(`
sasl_connect(postfix_smtpd_t)
')
@@ -78254,6 +78293,7 @@ index 5cfb83eca..657a4346e 100644
+
+optional_policy(`
+ mysql_stream_connect(postfix_domain)
++ mysql_rw_db_sockets(postfix_domain)
+')
+
+optional_policy(`
@@ -86309,7 +86349,7 @@ index 44605825c..4c66c2502 100644
+
')
diff --git a/radius.te b/radius.te
-index 403a4fed1..5357a7e46 100644
+index 403a4fed1..590926857 100644
--- a/radius.te
+++ b/radius.te
@@ -5,6 +5,13 @@ policy_module(radius, 1.13.0)
@@ -86342,11 +86382,21 @@ index 403a4fed1..5357a7e46 100644
+allow radiusd_t self:capability { chown dac_read_search fsetid kill setgid setuid sys_resource sys_tty_config sys_ptrace };
dontaudit radiusd_t self:capability sys_tty_config;
-allow radiusd_t self:process { getsched setrlimit setsched sigkill signal };
-+allow radiusd_t self:process { getsched setrlimit setsched sigkill signal ptrace};
++allow radiusd_t self:process { getsched setrlimit setsched sigkill signal};
allow radiusd_t self:fifo_file rw_fifo_file_perms;
allow radiusd_t self:unix_stream_socket { accept listen };
allow radiusd_t self:tcp_socket { accept listen };
-@@ -49,9 +59,7 @@ manage_lnk_files_pattern(radiusd_t, radiusd_etc_rw_t, radiusd_etc_rw_t)
+@@ -43,15 +53,17 @@ allow radiusd_t radiusd_etc_t:dir list_dir_perms;
+ allow radiusd_t radiusd_etc_t:file read_file_perms;
+ allow radiusd_t radiusd_etc_t:lnk_file read_lnk_file_perms;
+
++tunable_policy(`deny_ptrace',`',`
++ allow radiusd_t self:process ptrace;
++')
++
+ manage_dirs_pattern(radiusd_t, radiusd_etc_rw_t, radiusd_etc_rw_t)
+ manage_files_pattern(radiusd_t, radiusd_etc_rw_t, radiusd_etc_rw_t)
+ manage_lnk_files_pattern(radiusd_t, radiusd_etc_rw_t, radiusd_etc_rw_t)
filetrans_pattern(radiusd_t, radiusd_etc_t, radiusd_etc_rw_t, { dir file lnk_file })
manage_dirs_pattern(radiusd_t, radiusd_log_t, radiusd_log_t)
@@ -86357,7 +86407,7 @@ index 403a4fed1..5357a7e46 100644
logging_log_filetrans(radiusd_t, radiusd_log_t, { file dir })
manage_files_pattern(radiusd_t, radiusd_var_lib_t, radiusd_var_lib_t)
-@@ -60,11 +68,11 @@ manage_sock_files_pattern(radiusd_t, radiusd_var_run_t, radiusd_var_run_t)
+@@ -60,11 +72,11 @@ manage_sock_files_pattern(radiusd_t, radiusd_var_run_t, radiusd_var_run_t)
manage_dirs_pattern(radiusd_t, radiusd_var_run_t, radiusd_var_run_t)
manage_files_pattern(radiusd_t, radiusd_var_run_t, radiusd_var_run_t)
files_pid_filetrans(radiusd_t, radiusd_var_run_t, { file sock_file dir })
@@ -86370,7 +86420,7 @@ index 403a4fed1..5357a7e46 100644
corenet_all_recvfrom_netlabel(radiusd_t)
corenet_tcp_sendrecv_generic_if(radiusd_t)
corenet_udp_sendrecv_generic_if(radiusd_t)
-@@ -74,12 +82,22 @@ corenet_tcp_sendrecv_all_ports(radiusd_t)
+@@ -74,12 +86,22 @@ corenet_tcp_sendrecv_all_ports(radiusd_t)
corenet_udp_sendrecv_all_ports(radiusd_t)
corenet_udp_bind_generic_node(radiusd_t)
@@ -86393,7 +86443,7 @@ index 403a4fed1..5357a7e46 100644
corenet_sendrecv_snmp_client_packets(radiusd_t)
corenet_tcp_connect_snmp_port(radiusd_t)
-@@ -97,7 +115,6 @@ domain_use_interactive_fds(radiusd_t)
+@@ -97,7 +119,6 @@ domain_use_interactive_fds(radiusd_t)
fs_getattr_all_fs(radiusd_t)
fs_search_auto_mountpoints(radiusd_t)
@@ -86401,7 +86451,7 @@ index 403a4fed1..5357a7e46 100644
files_read_etc_runtime_files(radiusd_t)
files_dontaudit_list_tmp(radiusd_t)
-@@ -109,7 +126,6 @@ libs_exec_lib_files(radiusd_t)
+@@ -109,7 +130,6 @@ libs_exec_lib_files(radiusd_t)
logging_send_syslog_msg(radiusd_t)
@@ -86409,7 +86459,7 @@ index 403a4fed1..5357a7e46 100644
miscfiles_read_generic_certs(radiusd_t)
sysnet_use_ldap(radiusd_t)
-@@ -117,11 +133,22 @@ sysnet_use_ldap(radiusd_t)
+@@ -117,11 +137,22 @@ sysnet_use_ldap(radiusd_t)
userdom_dontaudit_use_unpriv_user_fds(radiusd_t)
userdom_dontaudit_search_user_home_dirs(radiusd_t)
@@ -86432,7 +86482,7 @@ index 403a4fed1..5357a7e46 100644
logrotate_exec(radiusd_t)
')
-@@ -132,6 +159,11 @@ optional_policy(`
+@@ -132,6 +163,11 @@ optional_policy(`
')
optional_policy(`
@@ -86444,7 +86494,7 @@ index 403a4fed1..5357a7e46 100644
samba_domtrans_winbind_helper(radiusd_t)
')
-@@ -140,5 +172,10 @@ optional_policy(`
+@@ -140,5 +176,10 @@ optional_policy(`
')
optional_policy(`
@@ -97654,7 +97704,7 @@ index 50d07fb2e..a34db489c 100644
+ allow $1 samba_unit_file_t:service all_service_perms;
')
diff --git a/samba.te b/samba.te
-index 2b7c441e7..0ad80a509 100644
+index 2b7c441e7..7443a9ded 100644
--- a/samba.te
+++ b/samba.te
@@ -6,99 +6,86 @@ policy_module(samba, 1.16.3)
@@ -98365,7 +98415,7 @@ index 2b7c441e7..0ad80a509 100644
manage_dirs_pattern(nmbd_t, { smbd_var_run_t nmbd_var_run_t }, nmbd_var_run_t)
manage_files_pattern(nmbd_t, nmbd_var_run_t, nmbd_var_run_t)
-@@ -526,20 +627,16 @@ read_files_pattern(nmbd_t, samba_etc_t, samba_etc_t)
+@@ -526,20 +627,17 @@ read_files_pattern(nmbd_t, samba_etc_t, samba_etc_t)
read_lnk_files_pattern(nmbd_t, samba_etc_t, samba_etc_t)
manage_dirs_pattern(nmbd_t, samba_log_t, samba_log_t)
@@ -98381,6 +98431,7 @@ index 2b7c441e7..0ad80a509 100644
manage_sock_files_pattern(nmbd_t, samba_var_t, samba_var_t)
-files_var_filetrans(nmbd_t, samba_var_t, dir, "nmbd")
files_var_filetrans(nmbd_t, samba_var_t, dir, "samba")
++allow nmbd_t samba_var_t:file map;
-allow nmbd_t { swat_t smbcontrol_t }:process signal;
-
@@ -98390,7 +98441,7 @@ index 2b7c441e7..0ad80a509 100644
kernel_getattr_core_if(nmbd_t)
kernel_getattr_message_if(nmbd_t)
-@@ -547,53 +644,44 @@ kernel_read_kernel_sysctls(nmbd_t)
+@@ -547,53 +645,44 @@ kernel_read_kernel_sysctls(nmbd_t)
kernel_read_network_state(nmbd_t)
kernel_read_software_raid_state(nmbd_t)
kernel_read_system_state(nmbd_t)
@@ -98459,7 +98510,7 @@ index 2b7c441e7..0ad80a509 100644
')
optional_policy(`
-@@ -606,18 +694,29 @@ optional_policy(`
+@@ -606,18 +695,29 @@ optional_policy(`
########################################
#
@@ -98495,7 +98546,7 @@ index 2b7c441e7..0ad80a509 100644
samba_read_config(smbcontrol_t)
samba_search_var(smbcontrol_t)
-@@ -627,39 +726,38 @@ domain_use_interactive_fds(smbcontrol_t)
+@@ -627,39 +727,38 @@ domain_use_interactive_fds(smbcontrol_t)
dev_read_urand(smbcontrol_t)
@@ -98547,7 +98598,7 @@ index 2b7c441e7..0ad80a509 100644
allow smbmount_t samba_secrets_t:file manage_file_perms;
-@@ -668,26 +766,22 @@ manage_files_pattern(smbmount_t, samba_var_t, samba_var_t)
+@@ -668,26 +767,22 @@ manage_files_pattern(smbmount_t, samba_var_t, samba_var_t)
manage_lnk_files_pattern(smbmount_t, samba_var_t, samba_var_t)
files_var_filetrans(smbmount_t, samba_var_t, dir, "samba")
@@ -98583,7 +98634,7 @@ index 2b7c441e7..0ad80a509 100644
fs_getattr_cifs(smbmount_t)
fs_mount_cifs(smbmount_t)
-@@ -699,58 +793,77 @@ fs_read_cifs_files(smbmount_t)
+@@ -699,58 +794,77 @@ fs_read_cifs_files(smbmount_t)
storage_raw_read_fixed_disk(smbmount_t)
storage_raw_write_fixed_disk(smbmount_t)
@@ -98676,7 +98727,7 @@ index 2b7c441e7..0ad80a509 100644
manage_dirs_pattern(swat_t, swat_tmp_t, swat_tmp_t)
manage_files_pattern(swat_t, swat_tmp_t, swat_tmp_t)
-@@ -759,17 +872,13 @@ files_tmp_filetrans(swat_t, swat_tmp_t, { file dir })
+@@ -759,17 +873,13 @@ files_tmp_filetrans(swat_t, swat_tmp_t, { file dir })
manage_files_pattern(swat_t, swat_var_run_t, swat_var_run_t)
files_pid_filetrans(swat_t, swat_var_run_t, file)
@@ -98700,7 +98751,7 @@ index 2b7c441e7..0ad80a509 100644
kernel_read_kernel_sysctls(swat_t)
kernel_read_system_state(swat_t)
-@@ -777,36 +886,25 @@ kernel_read_network_state(swat_t)
+@@ -777,36 +887,25 @@ kernel_read_network_state(swat_t)
corecmd_search_bin(swat_t)
@@ -98743,7 +98794,7 @@ index 2b7c441e7..0ad80a509 100644
auth_domtrans_chk_passwd(swat_t)
auth_use_nsswitch(swat_t)
-@@ -818,10 +916,11 @@ logging_send_syslog_msg(swat_t)
+@@ -818,10 +917,11 @@ logging_send_syslog_msg(swat_t)
logging_send_audit_msgs(swat_t)
logging_search_logs(swat_t)
@@ -98757,7 +98808,7 @@ index 2b7c441e7..0ad80a509 100644
optional_policy(`
cups_read_rw_config(swat_t)
cups_stream_connect(swat_t)
-@@ -840,17 +939,20 @@ optional_policy(`
+@@ -840,17 +940,20 @@ optional_policy(`
# Winbind local policy
#
@@ -98784,7 +98835,7 @@ index 2b7c441e7..0ad80a509 100644
allow winbind_t samba_etc_t:dir list_dir_perms;
read_files_pattern(winbind_t, samba_etc_t, samba_etc_t)
-@@ -860,9 +962,7 @@ manage_files_pattern(winbind_t, samba_etc_t, samba_secrets_t)
+@@ -860,9 +963,7 @@ manage_files_pattern(winbind_t, samba_etc_t, samba_secrets_t)
filetrans_pattern(winbind_t, samba_etc_t, samba_secrets_t, file)
manage_dirs_pattern(winbind_t, samba_log_t, samba_log_t)
@@ -98795,7 +98846,7 @@ index 2b7c441e7..0ad80a509 100644
manage_lnk_files_pattern(winbind_t, samba_log_t, samba_log_t)
manage_dirs_pattern(winbind_t, samba_var_t, samba_var_t)
-@@ -870,41 +970,46 @@ manage_files_pattern(winbind_t, samba_var_t, samba_var_t)
+@@ -870,41 +971,46 @@ manage_files_pattern(winbind_t, samba_var_t, samba_var_t)
manage_lnk_files_pattern(winbind_t, samba_var_t, samba_var_t)
manage_sock_files_pattern(winbind_t, samba_var_t, samba_var_t)
files_var_filetrans(winbind_t, samba_var_t, dir, "samba")
@@ -98854,7 +98905,7 @@ index 2b7c441e7..0ad80a509 100644
corenet_tcp_connect_smbd_port(winbind_t)
corenet_tcp_connect_epmap_port(winbind_t)
corenet_tcp_connect_all_unreserved_ports(winbind_t)
-@@ -912,38 +1017,52 @@ corenet_tcp_connect_all_unreserved_ports(winbind_t)
+@@ -912,38 +1018,52 @@ corenet_tcp_connect_all_unreserved_ports(winbind_t)
dev_read_sysfs(winbind_t)
dev_read_urand(winbind_t)
@@ -98913,7 +98964,7 @@ index 2b7c441e7..0ad80a509 100644
')
optional_policy(`
-@@ -959,31 +1078,36 @@ optional_policy(`
+@@ -959,31 +1079,36 @@ optional_policy(`
# Winbind helper local policy
#
@@ -98957,7 +99008,7 @@ index 2b7c441e7..0ad80a509 100644
optional_policy(`
apache_append_log(winbind_helper_t)
-@@ -997,25 +1121,38 @@ optional_policy(`
+@@ -997,25 +1122,38 @@ optional_policy(`
########################################
#
@@ -100984,10 +101035,10 @@ index 000000000..7a058a82a
+')
diff --git a/sbd.te b/sbd.te
new file mode 100644
-index 000000000..01266ebaf
+index 000000000..763349da1
--- /dev/null
+++ b/sbd.te
-@@ -0,0 +1,55 @@
+@@ -0,0 +1,62 @@
+policy_module(sbd, 1.0.0)
+
+########################################
@@ -101005,6 +101056,9 @@ index 000000000..01266ebaf
+type sbd_unit_file_t;
+systemd_unit_file(sbd_unit_file_t)
+
++type sbd_tmpfs_t;
++userdom_user_tmpfs_file(sbd_tmpfs_t)
++
+########################################
+#
+# sbd local policy
@@ -101020,6 +101074,10 @@ index 000000000..01266ebaf
+manage_lnk_files_pattern(sbd_t, sbd_var_run_t, sbd_var_run_t)
+files_pid_filetrans(sbd_t, sbd_var_run_t, { dir file lnk_file })
+
++manage_files_pattern(sbd_t, sbd_tmpfs_t, sbd_tmpfs_t)
++manage_dirs_pattern(sbd_t, sbd_tmpfs_t, sbd_tmpfs_t)
++fs_tmpfs_filetrans(sbd_t, sbd_tmpfs_t, { file dir })
++
+kernel_read_system_state(sbd_t)
+kernel_dgram_send(sbd_t)
+kernel_rw_kernel_sysctl(sbd_t)
@@ -123563,7 +123621,7 @@ index dd63de028..38ce6208e 100644
- admin_pattern($1, zabbix_tmpfs_t)
')
diff --git a/zabbix.te b/zabbix.te
-index 7f496c617..ad28abbc1 100644
+index 7f496c617..9c540d761 100644
--- a/zabbix.te
+++ b/zabbix.te
@@ -6,27 +6,32 @@ policy_module(zabbix, 1.6.0)
@@ -123602,7 +123660,7 @@ index 7f496c617..ad28abbc1 100644
type zabbix_log_t;
logging_log_file(zabbix_log_t)
-@@ -36,27 +41,61 @@ files_tmp_file(zabbix_tmp_t)
+@@ -36,27 +41,62 @@ files_tmp_file(zabbix_tmp_t)
type zabbix_tmpfs_t;
files_tmpfs_file(zabbix_tmpfs_t)
@@ -123658,6 +123716,7 @@ index 7f496c617..ad28abbc1 100644
-allow zabbix_t self:shm create_shm_perms;
-allow zabbix_t self:tcp_socket create_stream_socket_perms;
+allow zabbix_t self:capability { dac_read_search };
++allow zabbix_t self:process { setrlimit };
+
+manage_dirs_pattern(zabbix_t, zabbix_var_lib_t, zabbix_var_lib_t)
+manage_files_pattern(zabbix_t, zabbix_var_lib_t, zabbix_var_lib_t)
@@ -123676,7 +123735,7 @@ index 7f496c617..ad28abbc1 100644
manage_dirs_pattern(zabbix_t, zabbix_tmp_t, zabbix_tmp_t)
manage_files_pattern(zabbix_t, zabbix_tmp_t, zabbix_tmp_t)
-@@ -70,13 +109,9 @@ manage_files_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t)
+@@ -70,13 +110,9 @@ manage_files_pattern(zabbix_t, zabbix_var_run_t, zabbix_var_run_t)
files_pid_filetrans(zabbix_t, zabbix_var_run_t, { dir file })
kernel_read_system_state(zabbix_t)
@@ -123690,7 +123749,7 @@ index 7f496c617..ad28abbc1 100644
corenet_sendrecv_ftp_client_packets(zabbix_t)
corenet_tcp_connect_ftp_port(zabbix_t)
-@@ -85,24 +120,18 @@ corenet_tcp_sendrecv_ftp_port(zabbix_t)
+@@ -85,24 +121,18 @@ corenet_tcp_sendrecv_ftp_port(zabbix_t)
corenet_sendrecv_http_client_packets(zabbix_t)
corenet_tcp_connect_http_port(zabbix_t)
corenet_tcp_sendrecv_http_port(zabbix_t)
@@ -123718,7 +123777,7 @@ index 7f496c617..ad28abbc1 100644
tunable_policy(`zabbix_can_network',`
corenet_sendrecv_all_client_packets(zabbix_t)
corenet_tcp_connect_all_ports(zabbix_t)
-@@ -110,12 +139,11 @@ tunable_policy(`zabbix_can_network',`
+@@ -110,12 +140,11 @@ tunable_policy(`zabbix_can_network',`
')
optional_policy(`
@@ -123733,7 +123792,7 @@ index 7f496c617..ad28abbc1 100644
')
optional_policy(`
-@@ -125,6 +153,7 @@ optional_policy(`
+@@ -125,6 +154,7 @@ optional_policy(`
optional_policy(`
snmp_read_snmp_var_lib_files(zabbix_t)
@@ -123741,7 +123800,7 @@ index 7f496c617..ad28abbc1 100644
')
########################################
-@@ -132,18 +161,9 @@ optional_policy(`
+@@ -132,18 +162,9 @@ optional_policy(`
# Agent local policy
#
@@ -123762,7 +123821,7 @@ index 7f496c617..ad28abbc1 100644
rw_files_pattern(zabbix_agent_t, zabbix_tmpfs_t, zabbix_tmpfs_t)
fs_tmpfs_filetrans(zabbix_agent_t, zabbix_tmpfs_t, file)
-@@ -151,16 +171,13 @@ fs_tmpfs_filetrans(zabbix_agent_t, zabbix_tmpfs_t, file)
+@@ -151,16 +172,13 @@ fs_tmpfs_filetrans(zabbix_agent_t, zabbix_tmpfs_t, file)
manage_files_pattern(zabbix_agent_t, zabbix_var_run_t, zabbix_var_run_t)
files_pid_filetrans(zabbix_agent_t, zabbix_var_run_t, file)
@@ -123782,7 +123841,7 @@ index 7f496c617..ad28abbc1 100644
corenet_sendrecv_zabbix_agent_server_packets(zabbix_agent_t)
corenet_tcp_bind_zabbix_agent_port(zabbix_agent_t)
-@@ -170,6 +187,30 @@ corenet_sendrecv_ssh_client_packets(zabbix_agent_t)
+@@ -170,6 +188,30 @@ corenet_sendrecv_ssh_client_packets(zabbix_agent_t)
corenet_tcp_connect_ssh_port(zabbix_agent_t)
corenet_tcp_sendrecv_ssh_port(zabbix_agent_t)
@@ -123813,7 +123872,7 @@ index 7f496c617..ad28abbc1 100644
corenet_sendrecv_zabbix_client_packets(zabbix_agent_t)
corenet_tcp_connect_zabbix_port(zabbix_agent_t)
corenet_tcp_sendrecv_zabbix_port(zabbix_agent_t)
-@@ -177,21 +218,50 @@ corenet_tcp_sendrecv_zabbix_port(zabbix_agent_t)
+@@ -177,21 +219,50 @@ corenet_tcp_sendrecv_zabbix_port(zabbix_agent_t)
dev_getattr_all_blk_files(zabbix_agent_t)
dev_getattr_all_chr_files(zabbix_agent_t)
diff --git a/selinux-policy.spec b/selinux-policy.spec
index 01b8a40..1870b46 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -19,7 +19,7 @@
Summary: SELinux policy configuration
Name: selinux-policy
Version: 3.13.1
-Release: 299%{?dist}
+Release: 300%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: serefpolicy-%{version}.tgz
@@ -719,6 +719,21 @@ exit 0
%endif
%changelog
+* Thu Oct 26 2017 Lukas Vrabec