selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [refpolicy] [PATCH v2] ipsec: add missing permissions for pluto
@ 2018-07-26 15:51 Yuli Khodorkovskiy
  2018-07-26 21:27 ` Chris PeBenito
  0 siblings, 1 reply; 2+ messages in thread
From: Yuli Khodorkovskiy @ 2018-07-26 15:51 UTC (permalink / raw)
  To: refpolicy

When using libreswan, pluto needs permissions for building the
Security Association Database and for setting contexts on IPSec
policy and SAs.

Signed-off-by: Yuli Khodorkovskiy <yuli@crunchydata.com>
---
 policy/modules/system/ipsec.te | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/policy/modules/system/ipsec.te b/policy/modules/system/ipsec.te
index 867aefc4..1613a960 100644
--- a/policy/modules/system/ipsec.te
+++ b/policy/modules/system/ipsec.te
@@ -212,6 +212,12 @@ domtrans_pattern(ipsec_mgmt_t, ipsec_exec_t, ipsec_t)
 read_files_pattern(ipsec_mgmt_t, ipsec_t, ipsec_t)
 read_lnk_files_pattern(ipsec_mgmt_t, ipsec_t, ipsec_t)
 
+# allow pluto to build Security Association Database
+corenet_setcontext_all_spds(ipsec_t)
+
+# allow pluto to set contexts on ipsec policy and SAs
+domain_ipsec_setcontext_all_domains(ipsec_t)
+
 allow ipsec_mgmt_t ipsec_conf_file_t:file read_file_perms;
 
 manage_files_pattern(ipsec_mgmt_t, ipsec_key_file_t, ipsec_key_file_t)
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [refpolicy] [PATCH v2] ipsec: add missing permissions for pluto
  2018-07-26 15:51 [refpolicy] [PATCH v2] ipsec: add missing permissions for pluto Yuli Khodorkovskiy
@ 2018-07-26 21:27 ` Chris PeBenito
  0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2018-07-26 21:27 UTC (permalink / raw)
  To: refpolicy

On 07/26/2018 11:51 AM, Yuli Khodorkovskiy via refpolicy wrote:
> When using libreswan, pluto needs permissions for building the
> Security Association Database and for setting contexts on IPSec
> policy and SAs.
> 
> Signed-off-by: Yuli Khodorkovskiy <yuli@crunchydata.com>
> ---
>   policy/modules/system/ipsec.te | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/policy/modules/system/ipsec.te b/policy/modules/system/ipsec.te
> index 867aefc4..1613a960 100644
> --- a/policy/modules/system/ipsec.te
> +++ b/policy/modules/system/ipsec.te
> @@ -212,6 +212,12 @@ domtrans_pattern(ipsec_mgmt_t, ipsec_exec_t, ipsec_t)
>   read_files_pattern(ipsec_mgmt_t, ipsec_t, ipsec_t)
>   read_lnk_files_pattern(ipsec_mgmt_t, ipsec_t, ipsec_t)
>   
> +# allow pluto to build Security Association Database
> +corenet_setcontext_all_spds(ipsec_t)
> +
> +# allow pluto to set contexts on ipsec policy and SAs
> +domain_ipsec_setcontext_all_domains(ipsec_t)
> +
>   allow ipsec_mgmt_t ipsec_conf_file_t:file read_file_perms;
>   
>   manage_files_pattern(ipsec_mgmt_t, ipsec_key_file_t, ipsec_key_file_t)

One nit: the additions should be down with the other corenet and domain 
rules.

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-26 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 15:51 [refpolicy] [PATCH v2] ipsec: add missing permissions for pluto Yuli Khodorkovskiy
2018-07-26 21:27 ` Chris PeBenito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).