Fixes a crash when the I/O plugin calls error(), errorx() or log_error().
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <setjmp.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_ZLIB_H
#include "sudoers.h"
+/* plugin_error.c */
+extern sigjmp_buf error_jmp;
+
union io_fd {
FILE *f;
#ifdef HAVE_ZLIB_H
if (argc == 0)
return TRUE;
+ if (sigsetjmp(error_jmp, 1)) {
+ /* called via error(), errorx() or log_error() */
+ return -1;
+ }
+
/*
* Pull iolog settings out of command_info, if any.
*/