From: Sergey Kitov Date: Wed, 22 Nov 2017 09:34:47 +0000 (+0200) Subject: lib: Add logging of prctl(PR_SET_DUMPABLE) failure. X-Git-Tag: 2.3.0.rc1~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5cc54027974fac157b3dadfa93e551ad7c56b97;p=thirdparty%2Fdovecot%2Fcore.git lib: Add logging of prctl(PR_SET_DUMPABLE) failure. --- diff --git a/src/lib/restrict-access.c b/src/lib/restrict-access.c index 7441cef11f..ba97fd51a7 100644 --- a/src/lib/restrict-access.c +++ b/src/lib/restrict-access.c @@ -479,7 +479,8 @@ const char *restrict_access_get_current_chroot(void) void restrict_access_allow_coredumps(bool allow ATTR_UNUSED) { #ifdef HAVE_PR_SET_DUMPABLE - (void)prctl(PR_SET_DUMPABLE, allow ? 1 : 0, 0, 0, 0); + if (prctl(PR_SET_DUMPABLE, allow ? 1 : 0, 0, 0, 0) < 0) + i_error("prctl(PR_SET_DUMPABLE) failed: %m"); #endif }