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

switch-to-insecure-mode-if-tlsdownload-fails #97

Merged
merged 8 commits into from Jul 20, 2017

Update SELinux Error message

I have updated the SELinux error message and removed the code that was changing the security settings.
  • Loading branch information
Shwetajain148
Shwetajain148 committed Jun 28, 2017
commit 62d63026baae7770316e3c03d2c36460accc14fc
@@ -458,9 +458,8 @@ checkIfSelinuxServiceEnforced()
if [ $? -ne 0 ]; then
logMsgToConfigSysLog "INFO" "INFO: selinux status is not enforced."
elif [ $(getenforce | grep "Enforcing" | wc -l) -gt 0 ]; then
logMsgToConfigSysLog "Info" "Info: selinux status is 'Enforcing'. Setting it to the permissive mode and restarting the rsyslog daemon."
setenforce 0
restartRsyslog
logMsgToConfigSysLog "ERROR" "ERROR: selinux status is 'Enforcing'. Please manually restart the rsyslog daemon or turn off selinux by running `setenforce 0` and then rerun the script."
exit 1
fi

This comment has been minimized.

@Shwetajain148

Shwetajain148 Jun 23, 2017
Author Contributor

@mchaudhary and @mostlyjason, while running our script on different distributions, I found one more thing that was breaking our script execution(on RedHat) i.e. if SELinux status is enforcing in the system then the script exits by showing the above error message which I thought should not happen so if SELinux status is set to enforcing then I am showing an info message and setting the SELinux status to permissive mode by setting its value to 0 and restarting the rsyslog service so that changes take effect. In this way, our script will not exit in between and will run smoothly.

}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.