Skip to contentSkip to conversation

ipsec: add missing permissions for pluto

PATCH New Yuli Khodorkovskiy 2 participants 2 messages Jul 26, 2018 – Jul 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ipsec: add missing permissions for pluto

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

---
 policy/modules/system/ipsec.te | 4 ++++
 1 file changed, 4 insertions(+)
policy/modules/system/ipsec.te +4 -0
index 867aefc4..fe113277 100644
@@ -151,12 +151,16 @@ corenet_udp_bind_isakmp_port(ipsec_t)
 corenet_udp_bind_ipsecnat_port(ipsec_t)
 corenet_sendrecv_generic_server_packets(ipsec_t)
 corenet_sendrecv_isakmp_server_packets(ipsec_t)
+# allow pluto to build Security Association Database
+corenet_setcontext_all_spds(ipsec_t)
 
 dev_read_sysfs(ipsec_t)
 dev_read_rand(ipsec_t)
 dev_read_urand(ipsec_t)
 
 domain_use_interactive_fds(ipsec_t)
+# allow pluto to set contexts on ipsec policy and SAs
+domain_ipsec_setcontext_all_domains(ipsec_t)
 
 files_list_tmp(ipsec_t)
 files_read_etc_files(ipsec_t)
Signature · 1 line
2.18.0
#1 lore raw

PATCH v3 1/1 ipsec: add missing permissions for pluto

Quoted 20 lines · Yuli Khodorkovskiy via refpolicy

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

---
  policy/modules/system/ipsec.te | 4 ++++
  1 file changed, 4 insertions(+)
policy/modules/system/ipsec.te +2 -0
index 867aefc4..fe113277 100644
@@ -151,12 +151,16 @@ corenet_udp_bind_isakmp_port(ipsec_t)
  corenet_udp_bind_ipsecnat_port(ipsec_t)
  corenet_sendrecv_generic_server_packets(ipsec_t)
  corenet_sendrecv_isakmp_server_packets(ipsec_t)
+# allow pluto to build Security Association Database
+corenet_setcontext_all_spds(ipsec_t)
 

policy/modules/system/ipsec.te corenet_udp_bind_isakmp_port(ipsec_t) · line 166

Quoted 10 lines
policy/modules/system/ipsec.te +2 -0
  dev_read_sysfs(ipsec_t)
  dev_read_rand(ipsec_t)
  dev_read_urand(ipsec_t)
 
  domain_use_interactive_fds(ipsec_t)
+# allow pluto to set contexts on ipsec policy and SAs
+domain_ipsec_setcontext_all_domains(ipsec_t)
 
  files_list_tmp(ipsec_t)
  files_read_etc_files(ipsec_t)

Merged.

Signature · 1 line
Chris PeBenito