diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.46 2001/01/04 22:41:03 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.48 2001/01/13 18:43:31 markus Exp $"); |
37 | 37 | ||
38 | #include "xmalloc.h" | 38 | #include "xmalloc.h" |
39 | #include "ssh.h" | 39 | #include "ssh.h" |
@@ -405,10 +405,6 @@ do_authenticated(struct passwd * pw) | |||
405 | 405 | ||
406 | case SSH_CMSG_EXEC_SHELL: | 406 | case SSH_CMSG_EXEC_SHELL: |
407 | case SSH_CMSG_EXEC_CMD: | 407 | case SSH_CMSG_EXEC_CMD: |
408 | /* Set interactive/non-interactive mode. */ | ||
409 | packet_set_interactive(have_pty || s->display != NULL, | ||
410 | options.keepalives); | ||
411 | |||
412 | if (type == SSH_CMSG_EXEC_CMD) { | 408 | if (type == SSH_CMSG_EXEC_CMD) { |
413 | command = packet_get_string(&dlen); | 409 | command = packet_get_string(&dlen); |
414 | debug("Exec command '%.500s'", command); | 410 | debug("Exec command '%.500s'", command); |
@@ -548,6 +544,8 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw) | |||
548 | if (pid < 0) | 544 | if (pid < 0) |
549 | packet_disconnect("fork failed: %.100s", strerror(errno)); | 545 | packet_disconnect("fork failed: %.100s", strerror(errno)); |
550 | s->pid = pid; | 546 | s->pid = pid; |
547 | /* Set interactive/non-interactive mode. */ | ||
548 | packet_set_interactive(s->display != NULL); | ||
551 | #ifdef USE_PIPES | 549 | #ifdef USE_PIPES |
552 | /* We are the parent. Close the child sides of the pipes. */ | 550 | /* We are the parent. Close the child sides of the pipes. */ |
553 | close(pin[0]); | 551 | close(pin[0]); |
@@ -665,6 +663,7 @@ do_exec_pty(Session *s, const char *command, struct passwd * pw) | |||
665 | s->ptymaster = ptymaster; | 663 | s->ptymaster = ptymaster; |
666 | 664 | ||
667 | /* Enter interactive session. */ | 665 | /* Enter interactive session. */ |
666 | packet_set_interactive(1); | ||
668 | if (compat20) { | 667 | if (compat20) { |
669 | session_set_fds(s, ptyfd, fdout, -1); | 668 | session_set_fds(s, ptyfd, fdout, -1); |
670 | } else { | 669 | } else { |