ソースを参照

Disable core dumps

Bob Mottram 8 年 前
コミット
396b202982
共有1 個のファイルを変更した11 個の追加0 個の削除を含む
  1. 11
    0
      src/freedombone-utils-setup

+ 11
- 0
src/freedombone-utils-setup ファイルの表示

458
     chown root:root /etc/sudoers
458
     chown root:root /etc/sudoers
459
 }
459
 }
460
 
460
 
461
+function disable_core_dumps {
462
+    if ! grep '* hard core 0' /etc/security/limits.conf; then
463
+        echo '* hard core 0' >> /etc/security/limits.conf
464
+    else
465
+        sed -i 's|hard core.*|hard core 0|g' /etc/security/limits.conf
466
+    fi
467
+}
468
+
461
 function setup_firewall {
469
 function setup_firewall {
462
     function_check create_completion_file
470
     function_check create_completion_file
463
     create_completion_file
471
     create_completion_file
482
     read_config_param "PROJECT_REPO"
490
     read_config_param "PROJECT_REPO"
483
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
491
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
484
 
492
 
493
+    function_check disable_core_dumps
494
+    disable_core_dumps
495
+
485
     function_check remove_serial_logins
496
     function_check remove_serial_logins
486
     remove_serial_logins
497
     remove_serial_logins
487
 
498