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

Added option to delete the cron.deny file when $manage_users_deny is true. #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bschonec
Copy link

@bschonec bschonec commented Aug 26, 2024

Pull Request (PR) description

Ability to manage the existence of /etc/cron.deny. Some CIS audits recommend/require that if no entries are made to /etc/cron.deny then the file should be deleted.

This Pull Request (PR) fixes the following issues

Allows the deletion of /etc/cron.deny.

Reference #145

@bschonec bschonec force-pushed the delete_cron_dot_deny branch 3 times, most recently from e5a54f3 to 08da145 Compare August 26, 2024 18:15
@bschonec bschonec changed the title Added option to delete the cron.deny file when is true. Added option to delete the cron.deny file when $manage_users_deny is true. Aug 26, 2024
@TheMeier
Copy link
Contributor

LGTM. Won't approve since I don't use cron anymore :D

@bschonec
Copy link
Author

Indeed. Unfortunately, I'm still stuck in the past....

@bschonec
Copy link
Author

@TheMeier , are the tests running properly? I see a bunch of "Could not retrieve fact ipaddress" errors.

@yakatz
Copy link
Member

yakatz commented Aug 26, 2024

ipaddress is a legacy fact - it is no longer generated by default. Any tests that use it need to be updated.

The actual test failures don't appear to be related to that.

@bschonec bschonec force-pushed the delete_cron_dot_deny branch 2 times, most recently from 08da145 to 09c0311 Compare August 28, 2024 19:49
@bschonec
Copy link
Author

Whoops, I put the management in cron.allow instead of cron.deny. Fixed with this updated branch.

Copy link
Member

@ghoneycutt ghoneycutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add spec tests that show what happens when this is set to non-default (absent).

@bschonec bschonec force-pushed the delete_cron_dot_deny branch from 4e9feed to 29ac9e2 Compare January 21, 2025 14:08
@bschonec
Copy link
Author

@ghoneycutt acceptable test? I've very, very little experience writing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants