Skip to content

CentOS 8: proper selinux package naming #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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