All of lore.kernel.org
 help / color / mirror / Atom feed
From: dsugar@tresys.com (David Sugar)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/1] remove interface init_inherit_rlimit
Date: Thu, 21 Sep 2017 05:08:14 +0000	[thread overview]
Message-ID: <1B50C12ACFF4CB42B90D2581155DF50205B7BEA4@Exchange10.columbia.tresys.com> (raw)

Remove the interface init_inherit_rlimit and always allow rlimitinh permissions for daemon processes started by systemd.  

Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
 policy/modules/system/init.if | 27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if
index 303bd067..0caac118 100644
--- a/policy/modules/system/init.if
+++ b/policy/modules/system/init.if
@@ -132,6 +132,7 @@ interface(`init_domain',`
 	ifdef(`init_systemd',`
 		allow $1 init_t:unix_stream_socket { getattr read write ioctl };
 
+		allow init_t $1:process rlimitinh;
 		allow init_t $1:process2 { nnp_transition nosuid_transition };
 	')
 ')
@@ -214,6 +215,7 @@ interface(`init_spec_daemon_domain',`
 	ifdef(`init_systemd',`
 		allow $1 init_t:unix_stream_socket { getattr read write ioctl };
 
+		allow init_t $1:process rlimitinh;
 		allow init_t $1:process2 { nnp_transition nosuid_transition };
 	')
 
@@ -712,31 +714,6 @@ interface(`init_getpgid',`
 
 ########################################
 ## <summary>
-##	Allow process to inherit resource limits.
-## </summary>
-## <desc>
-## <p>
-##	This is applicable with systemd when using the
-##	options to limit resources - see
-##	https://www.freedesktop.org/software/systemd/man/systemd.exec.html#LimitMSGQUEUE=
-## </p>
-## </desc>
-## <param name="domain">
-##	<summary>
-##	Domain allowed access.
-##	</summary>
-## </param>
-#
-interface(`init_inherit_rlimit',`
-	gen_require(`
-		type init_t;
-	')
-
-	allow $1 init_t:process rlimitinh;
-')
-
-########################################
-## <summary>
 ##	Send init a generic signal.
 ## </summary>
 ## <param name="domain">
-- 
2.13.5

             reply	other threads:[~2017-09-21  5:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21  5:08 David Sugar [this message]
2017-09-23 18:16 ` [refpolicy] [PATCH 1/1] remove interface init_inherit_rlimit Chris 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=1B50C12ACFF4CB42B90D2581155DF50205B7BEA4@Exchange10.columbia.tresys.com \
    --to=dsugar@tresys.com \
    --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.