#511529 Do not reset hard limit for coredump size

Package:
exim4
Source:
exim4
Submitter:
Jörg Sommer
Date:
2026-02-05 17:39:04 UTC
Severity:
wishlist
Tags:
#511529#5
Date:
2009-01-11 19:21:13 UTC
From:
To:
Hi,

src/deliver.c:1726 lists the following code:

  /* Prevent core dumps, as we don't want them in users' home directories.
  HP-UX doesn't have RLIMIT_CORE; I don't know how to do this in that
  system. Some experimental/developing systems (e.g. GNU/Hurd) may define
  RLIMIT_CORE but not support it in setrlimit(). For such systems, do not
  complain if the error is "not supported". */

  #ifdef RLIMIT_CORE
  struct rlimit rl;
  rl.rlim_cur = 0;
  rl.rlim_max = 0;
  if (setrlimit(RLIMIT_CORE, &rl) < 0)

Setting the rlim_max to zero makes it impossible to enable coredumps for
subprocesses. Setting rlim_cur to zero would be enough to prevent
coredumps; soft limits vs. hard limits.

I've the problem that I pass my mails to bogofilter via the systemfilter
and bogofilter crashes sometimes (#510793). I want to get a coredump of
the crashed process to further insprect the problem, but it's not
possible because the hardlimit is set to zero and the systemfilter is not
run by root.
--- deliver.c+  2009-01-11 20:17:19.000000000 +0100
+++ deliver.c   2009-01-11 20:20:06.000000000 +0100
@@ -1731,8 +1731,9 @@

   #ifdef RLIMIT_CORE
   struct rlimit rl;
+  if (getrlimit(RLIMIT_CORE, &rl) < 0)
+    rl.rlim_max = 0;
   rl.rlim_cur = 0;
-  rl.rlim_max = 0;
   if (setrlimit(RLIMIT_CORE, &rl) < 0)
     {
     #ifdef SETRLIMIT_NOT_SUPPORTED

Bye, Jörg.

#511529#10
Date:
2009-06-07 12:25:13 UTC
From:
To:
forwarded #511529 http://bugs.exim.org/show_bug.cgi?id=852
thanks

Forwarded upstream.

Greetings
Marc

#511529#15
Date:
2009-06-07 12:25:13 UTC
From:
To:
forwarded #511529 http://bugs.exim.org/show_bug.cgi?id=852
thanks

Forwarded upstream.

Greetings
Marc