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

2009-06-07 Thread Marc Haber
forwarded #511529 http://bugs.exim.org/show_bug.cgi?id=852
thanks

Forwarded upstream.

Greetings
Marc

-- 
-
Marc Haber | I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things.Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2009-01-11 Thread Jörg Sommer
Package: exim4
Version: 4.69-9
Severity: wishlist
Tags: patch

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.0 +0100
+++ deliver.c   2009-01-11 20:20:06.0 +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.

-- 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-base4.69-9 support files for all Exim MTA (v4
ii  exim4-daemon-light4.69-9 lightweight Exim MTA (v4) daemon

exim4 recommends no packages.

exim4 suggests no packages.

-- debconf information:
  exim4/drec:


signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP