From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] Allow httpd_t to change its system resources
Date: Fri, 20 Apr 2012 17:45:15 +0200 [thread overview]
Message-ID: <20120420154515.GA4718@siphos.be> (raw)
When using lighttpd and server.max-fds is set, then the httpd_t domain requires the setrlimit (process) and sys_resource
(capability) privileges. As per fedora's (and now also Gentoo's) implementation we support this through a boolean called
"httpd_setrlimit" which is by default off).
Signed-off-by: Sven Vermeulen <sven.vermeulen@siphos.be>
---
apache.te | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/apache.te b/apache.te
index 5b02edb..dfd3ca7 100644
--- a/apache.te
+++ b/apache.te
@@ -100,6 +100,13 @@ gen_tunable(httpd_enable_homedirs, false)
## <desc>
## <p>
+## Allow httpd daemon to change its resource limits
+## </p>
+## </desc>
+gen_tunable(httpd_setrlimit, false)
+
+## <desc>
+## <p>
## Allow HTTPD to run SSI executables in the same domain as system CGI scripts.
## </p>
## </desc>
@@ -487,6 +494,11 @@ tunable_policy(`httpd_can_sendmail',`
mta_send_mail(httpd_t)
')
+tunable_policy(`httpd_setrlimit',`
+ allow httpd_t self:process setrlimit;
+ allow httpd_t self:capability sys_resource;
+')
+
tunable_policy(`httpd_ssi_exec',`
corecmd_shell_domtrans(httpd_t, httpd_sys_script_t)
allow httpd_sys_script_t httpd_t:fd use;
--
1.7.3.4
next reply other threads:[~2012-04-20 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 15:45 Sven Vermeulen [this message]
2012-05-04 12:44 ` [refpolicy] [PATCH 1/1] Allow httpd_t to change its system resources Christopher J. PeBenito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120420154515.GA4718@siphos.be \
--to=sven.vermeulen@siphos.be \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.