From 396b2029828e293944882f2881cfdb4a830ffea9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 29 Nov 2016 23:19:31 +0000 Subject: [PATCH] Disable core dumps --- src/freedombone-utils-setup | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 63727cc2..7e5de7d2 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -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