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.
This commit is contained in:
Todd C. Miller
2017-07-27 14:10:44 -06:00
parent 4b51622914
commit 1cfaf6c344

View File

@@ -192,6 +192,7 @@ log_ttyin(const char *buf, unsigned int n, struct io_buffer *iob)
/* Error: disable plugin's I/O function. */ /* Error: disable plugin's I/O function. */
plugin->u.io->log_ttyin = NULL; plugin->u.io->log_ttyin = NULL;
} }
ret = false;
break; break;
} }
} }
@@ -223,6 +224,7 @@ log_stdin(const char *buf, unsigned int n, struct io_buffer *iob)
/* Error: disable plugin's I/O function. */ /* Error: disable plugin's I/O function. */
plugin->u.io->log_stdin = NULL; plugin->u.io->log_stdin = NULL;
} }
ret = false;
break; break;
} }
} }
@@ -254,6 +256,7 @@ log_ttyout(const char *buf, unsigned int n, struct io_buffer *iob)
/* Error: disable plugin's I/O function. */ /* Error: disable plugin's I/O function. */
plugin->u.io->log_ttyout = NULL; plugin->u.io->log_ttyout = NULL;
} }
ret = false;
break; break;
} }
} }
@@ -297,6 +300,7 @@ log_stdout(const char *buf, unsigned int n, struct io_buffer *iob)
/* Error: disable plugin's I/O function. */ /* Error: disable plugin's I/O function. */
plugin->u.io->log_stdout = NULL; plugin->u.io->log_stdout = NULL;
} }
ret = false;
break; break;
} }
} }
@@ -340,6 +344,7 @@ log_stderr(const char *buf, unsigned int n, struct io_buffer *iob)
/* Error: disable plugin's I/O function. */ /* Error: disable plugin's I/O function. */
plugin->u.io->log_stderr = NULL; plugin->u.io->log_stderr = NULL;
} }
ret = false;
break; break;
} }
} }