From: serassio <> Date: Sat, 24 Sep 2005 19:21:00 +0000 (+0000) Subject: Bug #1334: Can't dump core on Linux when started as root X-Git-Tag: SQUID_3_0_PRE4~605 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdfd16aac620ebcc615025353ec115f36f65f11d;p=thirdparty%2Fsquid.git Bug #1334: Can't dump core on Linux when started as root Don't be as strict about verifying the prctl success. Not all kernels supports this prctl, but the only downside when not supported is that there won't be core dumps so there is no reason to report this error at level 0. Forward port of 2.5 patch. --- diff --git a/src/tools.cc b/src/tools.cc index 82d408f53b..988128108a 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.263 2005/09/17 05:50:08 wessels Exp $ + * $Id: tools.cc,v 1.264 2005/09/24 13:21:00 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -709,7 +709,7 @@ leave_suid(void) #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) /* Set Linux DUMPABLE flag */ if (Config.coredump_dir && prctl(PR_SET_DUMPABLE, 1) != 0) - debug(50, 0) ("ALERT: prctl: %s\n", xstrerror()); + debug(50, 2) ("ALERT: prctl: %s\n", xstrerror()); #endif } @@ -730,7 +730,7 @@ enter_suid(void) /* Set Linux DUMPABLE flag */ if (Config.coredump_dir && prctl(PR_SET_DUMPABLE, 1) != 0) - debug(50, 0) ("ALERT: prctl: %s\n", xstrerror()); + debug(50, 2) ("ALERT: prctl: %s\n", xstrerror()); #endif } @@ -761,7 +761,7 @@ no_suid(void) #if HAVE_PRCTL && defined(PR_SET_DUMPABLE) /* Set Linux DUMPABLE flag */ if (Config.coredump_dir && prctl(PR_SET_DUMPABLE, 1) != 0) - debug(50, 0) ("ALERT: prctl: %s\n", xstrerror()); + debug(50, 2) ("ALERT: prctl: %s\n", xstrerror()); #endif }