From: Todd C. Miller Date: Thu, 27 Jul 2017 20:10:44 +0000 (-0600) Subject: Terminate the command if an I/O log function returns 0 or -1. This X-Git-Tag: SUDO_1_8_21^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cfaf6c344772a09d267b76f1a8d5f35e2e3d813;p=sudo 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. --- 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; } }