From 1cfaf6c344772a09d267b76f1a8d5f35e2e3d813 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 27 Jul 2017 14:10:44 -0600 Subject: [PATCH] Terminate the command if an I/O log function returns 0 or -1. This was mistakenly removed by 25b7fd056614 in Sudo 1.8.18 with the removal of the ignore_iolog_errors variable. --- src/exec_pty.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/exec_pty.c b/src/exec_pty.c index 979fccfff..3e19c1125 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -192,6 +192,7 @@ log_ttyin(const char *buf, unsigned int n, struct io_buffer *iob) /* Error: disable plugin's I/O function. */ plugin->u.io->log_ttyin = NULL; } + ret = false; break; } } @@ -223,6 +224,7 @@ log_stdin(const char *buf, unsigned int n, struct io_buffer *iob) /* Error: disable plugin's I/O function. */ plugin->u.io->log_stdin = NULL; } + ret = false; break; } } @@ -254,6 +256,7 @@ log_ttyout(const char *buf, unsigned int n, struct io_buffer *iob) /* Error: disable plugin's I/O function. */ plugin->u.io->log_ttyout = NULL; } + ret = false; break; } } @@ -297,6 +300,7 @@ log_stdout(const char *buf, unsigned int n, struct io_buffer *iob) /* Error: disable plugin's I/O function. */ plugin->u.io->log_stdout = NULL; } + ret = false; break; } } @@ -340,6 +344,7 @@ log_stderr(const char *buf, unsigned int n, struct io_buffer *iob) /* Error: disable plugin's I/O function. */ plugin->u.io->log_stderr = NULL; } + ret = false; break; } } -- 2.40.0