public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jason Zaman" <perfinion@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/, policy/modules/roles/
Date: Sun,  2 Aug 2015 19:06:33 +0000 (UTC)	[thread overview]
Message-ID: <1438274488.d12c961da29084ced47ff21373925c02fc73e022.perfinion@gentoo> (raw)

commit:     d12c961da29084ced47ff21373925c02fc73e022
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sat Jul 11 09:15:46 2015 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Thu Jul 30 16:41:28 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d12c961d

Introduce setrans_admin interface

 policy/modules/roles/sysadm.te   |  4 ++++
 policy/modules/system/setrans.if | 31 +++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te
index 5901b2f..e96c1fd 100644
--- a/policy/modules/roles/sysadm.te
+++ b/policy/modules/roles/sysadm.te
@@ -952,6 +952,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	setrans_admin(sysadm_t, sysadm_r)
+')
+
+optional_policy(`
 	setroubleshoot_admin(sysadm_t, sysadm_r)
 ')
 

diff --git a/policy/modules/system/setrans.if b/policy/modules/system/setrans.if
index efa9c27..2a8ecaa 100644
--- a/policy/modules/system/setrans.if
+++ b/policy/modules/system/setrans.if
@@ -40,3 +40,34 @@ interface(`setrans_translate_context',`
 	stream_connect_pattern($1, setrans_var_run_t, setrans_var_run_t, setrans_t)
 	files_list_pids($1)
 ')
+
+######################################
+## <summary>
+##	All of the rules required to
+##	administrate an setrans environment.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <param name="role">
+##	<summary>
+##	Role allowed access.
+##	</summary>
+## </param>
+#
+interface(`setrans_admin',`
+	gen_require(`
+		type setrans_t, setrans_initrc_exec_t;
+		type setrans_var_run_t;
+	')
+
+	allow $1 setrans_t:process { ptrace signal_perms };
+	ps_process_pattern($1, setrans_t)
+
+	init_startstop_service($1, $2, setrans_t, setrans_initrc_exec_t)
+
+	files_search_pids($1)
+	admin_pattern($1, setrans_var_run_t)
+')


WARNING: multiple messages have this Message-ID (diff)
From: "Jason Zaman" <perfinion@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/roles/, policy/modules/system/
Date: Fri, 31 Jul 2015 14:15:38 +0000 (UTC)	[thread overview]
Message-ID: <1438274488.d12c961da29084ced47ff21373925c02fc73e022.perfinion@gentoo> (raw)
Message-ID: <20150731141538.snVOSH2hExmlTdmOUTtTW7rSVvDx2SeuUJrI3YF3DJM@z> (raw)

commit:     d12c961da29084ced47ff21373925c02fc73e022
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sat Jul 11 09:15:46 2015 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Thu Jul 30 16:41:28 2015 +0000
URL:        https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d12c961d

Introduce setrans_admin interface

 policy/modules/roles/sysadm.te   |  4 ++++
 policy/modules/system/setrans.if | 31 +++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/policy/modules/roles/sysadm.te b/policy/modules/roles/sysadm.te
index 5901b2f..e96c1fd 100644
--- a/policy/modules/roles/sysadm.te
+++ b/policy/modules/roles/sysadm.te
@@ -952,6 +952,10 @@ optional_policy(`
 ')
 
 optional_policy(`
+	setrans_admin(sysadm_t, sysadm_r)
+')
+
+optional_policy(`
 	setroubleshoot_admin(sysadm_t, sysadm_r)
 ')
 

diff --git a/policy/modules/system/setrans.if b/policy/modules/system/setrans.if
index efa9c27..2a8ecaa 100644
--- a/policy/modules/system/setrans.if
+++ b/policy/modules/system/setrans.if
@@ -40,3 +40,34 @@ interface(`setrans_translate_context',`
 	stream_connect_pattern($1, setrans_var_run_t, setrans_var_run_t, setrans_t)
 	files_list_pids($1)
 ')
+
+######################################
+## <summary>
+##	All of the rules required to
+##	administrate an setrans environment.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+## <param name="role">
+##	<summary>
+##	Role allowed access.
+##	</summary>
+## </param>
+#
+interface(`setrans_admin',`
+	gen_require(`
+		type setrans_t, setrans_initrc_exec_t;
+		type setrans_var_run_t;
+	')
+
+	allow $1 setrans_t:process { ptrace signal_perms };
+	ps_process_pattern($1, setrans_t)
+
+	init_startstop_service($1, $2, setrans_t, setrans_initrc_exec_t)
+
+	files_search_pids($1)
+	admin_pattern($1, setrans_var_run_t)
+')


             reply	other threads:[~2015-08-02 19:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-02 19:06 Jason Zaman [this message]
2015-07-31 14:15 ` [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/roles/, policy/modules/system/ Jason Zaman
  -- strict thread matches above, loose matches on Subject: below --
2015-08-02 19:06 [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/, policy/modules/roles/ Jason Zaman

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=1438274488.d12c961da29084ced47ff21373925c02fc73e022.perfinion@gentoo \
    --to=perfinion@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox