Bug#511529: Do not reset hard limit for coredump size

Jörg Sommer joerg at alea.gnuu.de
Sun Jan 11 19:21:13 UTC 2009

Package: exim4
Version: 4.69-9
Severity: wishlist
Tags: patch


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)

Bye, Jörg.

-- Package-specific info:
Exim version 4.69 #1 built 30-Sep-2008 18:26:35
Copyright (c) University of Cambridge 2006
Berkeley DB: Berkeley DB 4.6.21: (September 27, 2007)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /etc/exim4/exim4.conf

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (95, 'testing')
Architecture: i386 (i586)

Kernel: Linux 2.6.25-rc8
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages exim4 depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  exim4-base                    4.69-9     support files for all Exim MTA (v4
ii  exim4-daemon-light            4.69-9     lightweight Exim MTA (v4) daemon

exim4 recommends no packages.

exim4 suggests no packages.

-- debconf information:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature http://en.wikipedia.org/wiki/OpenPGP
Url : http://lists.alioth.debian.org/pipermail/pkg-exim4-maintainers/attachments/20090111/0b7159e6/attachment.pgp 

More information about the Pkg-exim4-maintainers mailing list