Skip to content
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

Adds support for CentOS 7 #91

Merged
merged 3 commits into from
Jun 28, 2016
Merged

Adds support for CentOS 7 #91

merged 3 commits into from
Jun 28, 2016

Conversation

conorsch
Copy link
Contributor

CentOS 7 introduced some breaking changes for the role, namely:

  • symlinks for system dirs: /bin -> /usr/bin, /sbin -> /usr/sbin
  • kernel.exec_shield sysctl parameter no longer configurable

This PR addresses the changes and provides backwards-compatible support for CentOS 7. Of particular note is the undocumented behavior of the sysctl Ansible module where use of the "sysctl_set" parameter overrides the "ignoreerrors" parameter. Was maddening to debug, but got to the bottom of it eventually.

There are still a few failing tests here, but pending inclusion of the new inspec suite and potentially the docker integration, I'm submitting anyway. The PR does indeed fix a few outstanding issues, so it warrants review for inclusion.

Fixes #71. Fixes #74. Supersedes and therefore closes #77.

Conor Schaefer added 3 commits June 25, 2016 22:43
Uses a two-pass approach that inspects all target directories, then only
operates on the true "directories," skipping the symlinks, if any. Using
the "recurse=true" parameter ensures that the suid/sgid modifications
are applied to files as well as directories.
It appears that the sysctl_set parameter overrides ignorerrors. Since we
fully expect `kernel.exec_shield` to be handled differently on CentOS
7+, where it is is no longer configurable, let's preserve the
functionality provided by ignorerrors.
@rndmh3ro rndmh3ro merged commit 371ed47 into dev-sec:master Jun 28, 2016
@rndmh3ro
Copy link
Member

Thanks for this, good work! :-)

rndmh3ro added a commit that referenced this pull request Jul 24, 2020
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this pull request Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants