From 73234928368a5bd1b076cff9e505d4faab9366d7 Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 7 Nov 2022 10:23:03 +0100 Subject: [PATCH] Disable core dumps --- asteriskify.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/asteriskify.c b/asteriskify.c index 7ea11f4..c903a3b 100644 --- a/asteriskify.c +++ b/asteriskify.c @@ -23,6 +23,7 @@ #include #include #include +#include #define PWBUF_SIZE 256 @@ -157,6 +158,12 @@ int main() exit(EXIT_FAILURE); } + if(prctl(PR_SET_DUMPABLE, 0) != 0) + { + fprintf(stderr, "Failed to make process not dumpable\n"); + exit(EXIT_FAILURE); + } + setup_console(); allocate_pw_buf();