Move the ignoring of I/O log plugin errors into the I/O log plugin
itself.
This commit is contained in:
@@ -89,7 +89,6 @@ static int ttymode = TERM_COOKED;
|
||||
static pid_t ppgrp, cmnd_pgrp, mon_pgrp;
|
||||
static sigset_t ttyblock;
|
||||
static struct io_buffer_list iobufs;
|
||||
static bool ignore_iolog_errors;
|
||||
|
||||
static void del_io_events(bool nonblocking);
|
||||
static int exec_monitor(struct command_details *details, int backchannel);
|
||||
@@ -219,8 +218,6 @@ 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;
|
||||
}
|
||||
if (!ignore_iolog_errors)
|
||||
rval = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -252,8 +249,6 @@ 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;
|
||||
}
|
||||
if (!ignore_iolog_errors)
|
||||
rval = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -285,8 +280,6 @@ 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;
|
||||
}
|
||||
if (!ignore_iolog_errors)
|
||||
rval = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -330,8 +323,6 @@ 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;
|
||||
}
|
||||
if (!ignore_iolog_errors)
|
||||
rval = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -375,8 +366,6 @@ 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;
|
||||
}
|
||||
if (!ignore_iolog_errors)
|
||||
rval = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -749,13 +738,6 @@ fork_pty(struct command_details *details, int sv[], sigset_t *omask)
|
||||
sigaddset(&ttyblock, SIGTTIN);
|
||||
sigaddset(&ttyblock, SIGTTOU);
|
||||
|
||||
/*
|
||||
* The security policy may tell us to ignore errors from the
|
||||
* I/O log functions.
|
||||
*/
|
||||
if (!ISSET(details->flags, CD_IGNORE_IOLOG_ERRS))
|
||||
ignore_iolog_errors = true;
|
||||
|
||||
/*
|
||||
* Setup stdin/stdout/stderr for child, to be duped after forking.
|
||||
* In background mode there is no stdin.
|
||||
|
Reference in New Issue
Block a user