Allow stdin and ttyin to be displayed too. The only one that is

really useful in sudoreplay is stdin when input is from a pipe.
This commit is contained in:
Todd C. Miller
2016-11-30 13:38:01 -07:00
parent 52d6a5e40d
commit cb1f044017
4 changed files with 14 additions and 6 deletions

View File

@@ -222,10 +222,14 @@ main(int argc, char *argv[])
/* Set the replay filter. */
def_filter = false;
for (cp = strtok_r(optarg, ",", &ep); cp; cp = strtok_r(NULL, ",", &ep)) {
if (strcmp(cp, "stdout") == 0)
if (strcmp(cp, "stdin") == 0)
io_log_files[IOFD_STDIN].enabled = true;
else if (strcmp(cp, "stdout") == 0)
io_log_files[IOFD_STDOUT].enabled = true;
else if (strcmp(cp, "stderr") == 0)
io_log_files[IOFD_STDERR].enabled = true;
else if (strcmp(cp, "ttyin") == 0)
io_log_files[IOFD_TTYIN].enabled = true;
else if (strcmp(cp, "ttyout") == 0)
io_log_files[IOFD_TTYOUT].enabled = true;
else