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.2.34~123 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a089f121030cb8ab34a5c8a1d42bc5e04594a64;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 194c143a48..5f2e595c51 100644 --- a/src/lib/restrict-access.c +++ b/src/lib/restrict-access.c @@ -480,7 +480,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, 0, 0, 0); + if (prctl(PR_SET_DUMPABLE, allow ? 1 : 0, 0, 0, 0) < 0) + i_error("prctl(PR_SET_DUMPABLE) failed: %m"); #endif }