Bug 984686 - strongswan file contexts should mirror the current ipsec contexts
Summary: strongswan file contexts should mirror the current ipsec contexts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-15 16:58 UTC by Jamie Nguyen
Modified: 2014-02-23 15:28 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 986883 (view as bug list)
Environment:
Last Closed: 2014-02-23 15:28:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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).


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