source3: Honor the core soft limit of the OS.
authorIra Cooper <ira@samba.org>
Thu, 3 Mar 2016 18:47:32 +0000 (13:47 -0500)
committerJeremy Allison <jra@samba.org>
Fri, 4 Mar 2016 23:39:48 +0000 (00:39 +0100)
We should honor the soft limits set by the operating system.

In any case, 16M doesn't make a useful coredump for modern
Samba.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar  5 00:39:48 CET 2016 on sn-devel-144

source3/lib/dumpcore.c

index 487ccecc742ef14d4d7047448e9c82bbaf8acc41..c72aa882bd884213b6eb597f31054f02b59ac740 100644 (file)
@@ -251,21 +251,6 @@ void dump_core_setup(const char *progname, const char *log_file)
                goto out;
        }
 
-
-#ifdef HAVE_GETRLIMIT
-#ifdef RLIMIT_CORE
-       {
-               struct rlimit rlp;
-               getrlimit(RLIMIT_CORE, &rlp);
-               rlp.rlim_cur = MAX(16*1024*1024,rlp.rlim_cur);
-               setrlimit(RLIMIT_CORE, &rlp);
-               getrlimit(RLIMIT_CORE, &rlp);
-               DEBUG(3,("Maximum core file size limits now %d(soft) %d(hard)\n",
-                        (int)rlp.rlim_cur,(int)rlp.rlim_max));
-       }
-#endif
-#endif
-
        /* FIXME: if we have a core-plus-pid facility, configurably set
         * this up here.
         */