++##
++## Allow zarafa domains to setrlimit/sys_rouserce.
++##
++##
++gen_tunable(zarafa_setrlimit, false)
++
attribute zarafa_domain;
-attribute zarafa_logfile;
-attribute zarafa_pidfile;
zarafa_domain_template(deliver)
-@@ -17,9 +15,6 @@ files_tmp_file(zarafa_deliver_tmp_t)
+@@ -17,9 +22,6 @@ files_tmp_file(zarafa_deliver_tmp_t)
type zarafa_etc_t;
files_config_file(zarafa_etc_t)
@@ -97546,7 +97598,7 @@ index a4479b1..7a9f1b6 100644
zarafa_domain_template(gateway)
zarafa_domain_template(ical)
zarafa_domain_template(indexer)
-@@ -43,61 +38,74 @@ files_tmp_file(zarafa_var_lib_t)
+@@ -43,61 +45,74 @@ files_tmp_file(zarafa_var_lib_t)
########################################
#
@@ -97641,7 +97693,7 @@ index a4479b1..7a9f1b6 100644
manage_dirs_pattern(zarafa_server_t, zarafa_server_tmp_t, zarafa_server_tmp_t)
manage_files_pattern(zarafa_server_t, zarafa_server_tmp_t, zarafa_server_tmp_t)
files_tmp_filetrans(zarafa_server_t, zarafa_server_tmp_t, { file dir })
-@@ -109,70 +117,80 @@ files_var_lib_filetrans(zarafa_server_t, zarafa_var_lib_t, { file dir lnk_file }
+@@ -109,70 +124,85 @@ files_var_lib_filetrans(zarafa_server_t, zarafa_var_lib_t, { file dir lnk_file }
stream_connect_pattern(zarafa_server_t, zarafa_indexer_var_run_t, zarafa_indexer_var_run_t, zarafa_indexer_t)
@@ -97703,14 +97755,14 @@ index a4479b1..7a9f1b6 100644
#
-# Zarafa domain local policy
+# zarafa_gateway local policy
-+#
+ #
+corenet_tcp_bind_pop_port(zarafa_gateway_t)
-+
+
+#######################################
+#
+# zarafa-ical local policy
- #
-
++#
++
+corenet_tcp_bind_http_cache_port(zarafa_ical_t)
+
+######################################
@@ -97727,12 +97779,17 @@ index a4479b1..7a9f1b6 100644
+# bad permission on /etc/zarafa
allow zarafa_domain self:capability { kill dac_override chown setgid setuid };
-allow zarafa_domain self:process { setrlimit signal };
-+allow zarafa_domain self:process { signal_perms setrlimit };
++allow zarafa_domain self:process { signal_perms };
allow zarafa_domain self:fifo_file rw_fifo_file_perms;
-allow zarafa_domain self:tcp_socket { accept listen };
-allow zarafa_domain self:unix_stream_socket { accept listen };
+allow zarafa_domain self:tcp_socket create_stream_socket_perms;
+allow zarafa_domain self:unix_stream_socket create_stream_socket_perms;
++
++tunable_policy(`zarafa_setrlimit',`
++ allow zarafa_domain self:capability sys_resource;
++ allow zarafa_domain self:process setrlimit;
++')
stream_connect_pattern(zarafa_domain, zarafa_server_var_run_t, zarafa_server_var_run_t, zarafa_server_t)
diff --git a/selinux-policy.spec b/selinux-policy.spec
index b4b14da..8239e16 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -19,7 +19,7 @@
Summary: SELinux policy configuration
Name: selinux-policy
Version: 3.12.1
-Release: 80%{?dist}
+Release: 81%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: serefpolicy-%{version}.tgz
@@ -570,6 +570,23 @@ SELinux Reference policy mls base module.
%endif
%changelog
+* Thu Sep 19 2013 Miroslav Grepl