]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Add logging of prctl(PR_SET_DUMPABLE) failure.
authorSergey Kitov <sergey.kitov@open-xchange.com>
Wed, 22 Nov 2017 09:34:47 +0000 (11:34 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 19 Jan 2018 12:26:03 +0000 (14:26 +0200)
src/lib/restrict-access.c

index 194c143a489ca7c223a58d82c1f978a4278719a7..5f2e595c5131aba690313310d28e88b6a8e56663 100644 (file)
@@ -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
 }