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 SELinux support for the Icinga 2 core #141

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

lbetz
Copy link
Contributor

@lbetz lbetz commented Aug 3, 2024

No description provided.

@lbetz lbetz added the enhancement New feature or request label Aug 3, 2024
@lbetz lbetz added this to the v6.0.0 milestone Aug 3, 2024
@lbetz lbetz requested a review from SimonHoenscheid August 3, 2024 17:50
@lbetz lbetz force-pushed the enhancement/selinux branch from 9720327 to da92e0b Compare August 3, 2024 18:28
@@ -89,6 +89,13 @@
features => [],
}

# check selinux
$_selinux = if fact('os.selinux.enabled') and $facts['os']['selinux']['enabled'] and $icinga2::globals::selinux_package_name {
Copy link
Member

Choose a reason for hiding this comment

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

I think we can simplify it a bit. fact() will return the fact value, if the fact exists, or undef:

Suggested change
$_selinux = if fact('os.selinux.enabled') and $facts['os']['selinux']['enabled'] and $icinga2::globals::selinux_package_name {
$_selinux = if fact('os.selinux.enabled') == true and $icinga2::globals::selinux_package_name {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did it the same way as in the icinga2 module. And the unit test on FreeBSD and Windows said it's required.

@lbetz lbetz merged commit 8d0610e into voxpupuli:main Aug 3, 2024
5 checks passed
@lbetz lbetz deleted the enhancement/selinux branch August 3, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants