]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(MODULES-4173) Fixes selinux issues on centos7
authorBryan Jen <bryan.jen@gmail.com>
Fri, 2 Dec 2016 16:57:23 +0000 (16:57 +0000)
committerBryan Jen <bryan.jen@gmail.com>
Fri, 2 Dec 2016 17:02:43 +0000 (17:02 +0000)
manifests/linux/redhat.pp

index 8f38929430929ae5b18744fad545dbd6da421a34..a6bfe836cf4fac29561be205ee8c515e7f348277 100644 (file)
@@ -76,7 +76,12 @@ class firewall::linux::redhat (
       #lint:ignore:quoted_booleans
       'true',true: {
         case $::operatingsystemrelease {
-          /^(6|7)\..*/: { File["/etc/sysconfig/${service_name}"] { seluser => 'unconfined_u', seltype => 'etc_t' } }
+          /^(6|7)\..*/: {
+            case $::operatingsystem {
+              'CentOS': { File["/etc/sysconfig/${service_name}"] { seluser => 'unconfined_u', seltype => 'system_conf_t' } }
+              default : { File["/etc/sysconfig/${service_name}"] { seluser => 'unconfined_u', seltype => 'etc_t' } }
+            }
+          }
           default:      { File["/etc/sysconfig/${service_name}"] { seluser => 'system_u', seltype => 'system_conf_t' } }
         }
       }