mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
Move the revert-to-non-blocking-stdin code to cli-session so it
always gets hit. --HG-- extra : convert_revision : 3eb50d87fa6439d336b2238926fbed5066302d30
This commit is contained in:
@@ -63,10 +63,6 @@ static void cli_closechansess(struct Channel *channel) {
|
||||
|
||||
cli_tty_cleanup(); /* Restore tty modes etc */
|
||||
|
||||
/* Set stdin back to non-blocking - busybox ash dies nastily
|
||||
* if we don't revert the flags */
|
||||
fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags);
|
||||
|
||||
}
|
||||
|
||||
static void start_channel_request(struct Channel *channel,
|
||||
@@ -317,13 +313,9 @@ static void send_chansess_shell_req(struct Channel *channel) {
|
||||
|
||||
static int cli_initchansess(struct Channel *channel) {
|
||||
|
||||
/* We store stdin's flags, so we can set them back on exit (otherwise
|
||||
* busybox's ash isn't happy */
|
||||
cli_ses.stdincopy = dup(STDIN_FILENO);
|
||||
cli_ses.stdinflags = fcntl(STDIN_FILENO, F_GETFL, 0);
|
||||
|
||||
channel->infd = STDOUT_FILENO;
|
||||
//channel->outfd = STDIN_FILENO;
|
||||
channel->outfd = STDIN_FILENO;
|
||||
//channel->errfd = STDERR_FILENO;
|
||||
|
||||
if (cli_opts.wantpty) {
|
||||
|
||||
Reference in New Issue
Block a user