Disable core dumps

This commit is contained in:
Bob Mottram 2016-11-29 23:19:31 +00:00
parent a76a4d22f9
commit 396b202982
1 changed files with 11 additions and 0 deletions

View File

@ -458,6 +458,14 @@ function set_command_file_permissions {
chown root:root /etc/sudoers
}
function disable_core_dumps {
if ! grep '* hard core 0' /etc/security/limits.conf; then
echo '* hard core 0' >> /etc/security/limits.conf
else
sed -i 's|hard core.*|hard core 0|g' /etc/security/limits.conf
fi
}
function setup_firewall {
function_check create_completion_file
create_completion_file
@ -482,6 +490,9 @@ function setup_utils {
read_config_param "PROJECT_REPO"
write_config_param "PROJECT_REPO" "$PROJECT_REPO"
function_check disable_core_dumps
disable_core_dumps
function_check remove_serial_logins
remove_serial_logins