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

Add support of /etc/sysctl.d/*.conf in the sysctl parameter check template for RHEL6 #45

Merged
merged 2 commits into from
Sep 12, 2014

Conversation

ssato
Copy link
Contributor

@ssato ssato commented Sep 2, 2014

This should fix the issue #36, I guess.

BTW, I do not regenerate actual checks in RHEL/6/input/checks/sysctl_* yet.
If I need to do that please let me know.

@redhatrises redhatrises modified the milestones: 0.1.19, 0.1.20 Sep 3, 2014
@redhatrises redhatrises added the bug label Sep 3, 2014
@ssato
Copy link
Contributor Author

ssato commented Sep 7, 2014

The loading order of sysctl conf files are as follows.

a) /etc/sysctl.conf, /etc/sysctl.d/.conf in RHEL 6. See also: apply_sysctl() in /etc/rc.d/init.d/functions.
b) /usr/lib/sysctl.d/
.conf, /run/sysctl.d/.conf, /etc/sysctl.d/.conf; /etc/sysctl.d/99-sysctl.conf is symlinked to /etc/sysctl.conf in RHEL7/F20+. See also sysctl.d(5).

I don't know how to write it to take care of the ordering of priorities of these
sysctl configuration files. However, the criteria of sysctl consists of a couple of
criterion, both live (sysctl command) and static (/etc/sysctl.conf and /etc/sysctl.d/*.conf)
sysctl parameters must be set (//criteria[@operator = 'AND']). That is, it implies
that target parameter must be set in the highest priority of static configuration files
anyway. So I guess this change is enough for most cases.

@ssato
Copy link
Contributor Author

ssato commented Sep 7, 2014

If it's OK, could you please merge it ? After that I'll make another PR to merge
changes of generated files if you don't mind.

@shawndwells
Copy link
Member

@ssato For commit e7af034 / the RHEL 7 check, update the platform tag and I'll merge.

shawndwells added a commit that referenced this pull request Sep 12, 2014
Add support of /etc/sysctl.d/*.conf in the sysctl parameter check template for RHEL6
@shawndwells shawndwells merged commit d755bc0 into ComplianceAsCode:master Sep 12, 2014
@shawndwells
Copy link
Member

@ssato went ahead and merged. manually updated the platform tag.

brett060102 added a commit to brett060102/content that referenced this pull request Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes to reported bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants