sysctl.conf: include PID in file names of generated core dumps

Message ID e5df0d02-c8ac-8589-5d2c-4b4c70593024@ipfire.org
State Accepted
Commit b474e87bb8a4199fb20e88d5a98593817ecd3f3f
Headers
Series sysctl.conf: include PID in file names of generated core dumps |

Commit Message

Peter Müller Nov. 3, 2020, 3:14 p.m. UTC
  This is recommended by various Linux hardening guides in order to
prevent accidential overwriting of existing core dumps. While it has
probably little to no relevance to the average IPFire user, enabling it
won't harm and fixes a Lynis warning. :-)

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/etc/sysctl.conf | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf
index be7c07c85..c9b4c092a 100644
--- a/config/etc/sysctl.conf
+++ b/config/etc/sysctl.conf
@@ -103,3 +103,6 @@  net.ipv4.tcp_fastopen = 3
 # This protects against various TCP attacks, such as DoS against or injection
 # of arbitrary segments into prematurely closed connections.
 net.ipv4.tcp_rfc1337 = 1
+
+# Include PID in file names of generated core dumps
+kernel.core_uses_pid = 1