Skip to content

Commit

Permalink
Merge pull request #223 from artem-forks/centos-8-support
Browse files Browse the repository at this point in the history
CentOS 8: proper selinux package naming
  • Loading branch information
artem-sidorenko authored Oct 30, 2019
2 parents 5e56a20 + 9cc66c9 commit d7f09d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ script:
- bundle exec rake kitchen KITCHEN_LOCAL_YAML=.kitchen.dokken.yml

matrix:
allow_failures:
# temporaray disable failing tests until all problems are fixed
- env: INSTANCE=centos-8
include:
- env: UNIT_AND_LINT=1
script:
Expand Down
8 changes: 8 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
default['ssh-hardening']['sshclient']['package'] = 'openssh-client'
end

# Define the package name for selinux utils
if node['platform_family'] == 'fedora' || # rubocop:disable Style/ConditionalAssignment
node['platform_family'] == 'rhel' && node['platform_version'].to_f >= 8
default['ssh-hardening']['selinux']['package'] = 'policycoreutils-python-utils'
else
default['ssh-hardening']['selinux']['package'] = 'policycoreutils-python'
end

# Define the server package name
case node['platform']
when 'suse', 'opensuse', 'opensuseleap'
Expand Down
4 changes: 1 addition & 3 deletions recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
module_file = ::File.join(cache_dir, 'ssh_password.mod')
package_file = ::File.join(cache_dir, 'ssh_password.pp')

package 'policycoreutils-python'
# on fedora we need an addtional package for semodule_package
package 'policycoreutils-python-utils' if node['platform_family'] == 'fedora'
package node['ssh-hardening']['selinux']['package']

if node['ssh-hardening']['ssh']['server']['use_pam']
# UsePAM yes: disable and remove the additional SELinux policy
Expand Down

0 comments on commit d7f09d4

Please sign in to comment.