Bug 984686

Summary: strongswan file contexts should mirror the current ipsec contexts
Product: [Fedora] Fedora Reporter: Jamie Nguyen <jamielinux>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 986883 (view as bug list) Environment:
Last Closed: 2014-02-23 15:28:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jamie Nguyen 2013-07-15 16:58:27 UTC
Description:
============

openswan has the correct fcontexts set, but strongswan is missing a few.

The current contexts for openswan:

  /etc/ipsec\.conf
  regular file   system_u:object_r:ipsec_conf_file_t:s0

  /etc/ipsec\.d(/.*)?
  all files      system_u:object_r:ipsec_key_file_t:s0

  /etc/ipsec\.d/examples(/.*)?
  all files      system_u:object_r:etc_t:s0

  /etc/ipsec\.secrets.*
  regular file   system_u:object_r:ipsec_key_file_t:s0

  /etc/rc\.d/init\.d/ipsec
  regular file   system_u:object_r:ipsec_initrc_exec_t:s0

  /var/lock/subsys/ipsec
  regular file   system_u:object_r:ipsec_mgmt_lock_t:s0 


However, the /etc/strongswan/ipsec.d/ directory only has this:

  /etc/strongswan(/.*)?
  all files      system_u:object_r:ipsec_conf_file_t:s0


Solution:
=========

The /etc/strongswan/ipsec.d/ directory should mirror the contexts above, so it looks like this:

  /etc/strongswan/ipsec\.conf
  regular file   system_u:object_r:ipsec_conf_file_t:s0

  /etc/strongswan/ipsec\.d(/.*)?
  all files      system_u:object_r:ipsec_key_file_t:s0

  /etc/strongswan/ipsec\.d/examples(/.*)?
  all files      system_u:object_r:etc_t:s0

  /etc/strongswan/ipsec\.secrets.*
  regular file   system_u:object_r:ipsec_key_file_t:s0

  /etc/rc\.d/init\.d/strongswan
  regular file   system_u:object_r:ipsec_initrc_exec_t:s0

  /var/lock/subsys/strongswan
  regular file   system_u:object_r:ipsec_mgmt_lock_t:s0 



Version-Release number of selected component (if applicable):

Could you please fix this on rawhide, f19, f18 and el6? Thanks!

Comment 1 Miroslav Grepl 2013-07-16 08:52:30 UTC
Added.

commit 797d28d0dd8a6010078aab159aacfa64acb96b29
Author: Miroslav Grepl <mgrepl>
Date:   Tue Jul 16 10:36:28 2013 +0200

    Add additional labeling for strongswan

Comment 2 Jamie Nguyen 2013-07-16 10:10:50 UTC
Thanks!

I forgot to mention that on EL6, it's also missing this one (in addition to all of the above mentioned):

  /usr/sbin/strongswan
  regular file   system_u:object_r:ipsec_mgmt_exec_t:s0

Comment 3 Fedora End Of Life 2013-09-16 17:01:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 4 Fedora Update System 2013-09-25 20:39:04 UTC
selinux-policy-3.12.1-83.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-83.fc20

Comment 5 Fedora Update System 2013-09-27 00:42:39 UTC
Package selinux-policy-3.12.1-83.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-83.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17722/selinux-policy-3.12.1-83.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-10-02 06:42:32 UTC
Package selinux-policy-3.12.1-84.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-84.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17722/selinux-policy-3.12.1-84.fc20
then log in and leave karma (feedback).