This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 984686 - strongswan file contexts should mirror the current ipsec contexts
strongswan file contexts should mirror the current ipsec contexts
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 12:58 EDT by Jamie Nguyen
Modified: 2014-02-23 10:28 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 986883 (view as bug list)
Environment:
Last Closed: 2014-02-23 10:28:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jamie Nguyen 2013-07-15 12:58:27 EDT
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 04:52:30 EDT
Added.

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

    Add additional labeling for strongswan
Comment 2 Jamie Nguyen 2013-07-16 06:10:50 EDT
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 13:01:26 EDT
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 16:39:04 EDT
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-26 20:42:39 EDT
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 02:42:32 EDT
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).

Note You need to log in before you can comment on or make changes to this bug.