diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.78 2000/12/19 23:17:58 markus Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.79 2000/12/27 11:51:54 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/dsa.h> | 45 | #include <openssl/dsa.h> |
@@ -79,10 +79,11 @@ int debug_flag = 0; | |||
79 | 79 | ||
80 | /* Flag indicating whether a tty should be allocated */ | 80 | /* Flag indicating whether a tty should be allocated */ |
81 | int tty_flag = 0; | 81 | int tty_flag = 0; |
82 | int no_tty_flag = 0; | ||
83 | int force_tty_flag = 0; | ||
82 | 84 | ||
83 | /* don't exec a shell */ | 85 | /* don't exec a shell */ |
84 | int no_shell_flag = 0; | 86 | int no_shell_flag = 0; |
85 | int no_tty_flag = 0; | ||
86 | 87 | ||
87 | /* | 88 | /* |
88 | * Flag indicating that nothing should be read from stdin. This can be set | 89 | * Flag indicating that nothing should be read from stdin. This can be set |
@@ -373,6 +374,8 @@ main(int ac, char **av) | |||
373 | options.identity_files[options.num_identity_files++] = xstrdup(optarg); | 374 | options.identity_files[options.num_identity_files++] = xstrdup(optarg); |
374 | break; | 375 | break; |
375 | case 't': | 376 | case 't': |
377 | if (tty_flag) | ||
378 | force_tty_flag = 1; | ||
376 | tty_flag = 1; | 379 | tty_flag = 1; |
377 | break; | 380 | break; |
378 | case 'v': | 381 | case 'v': |
@@ -521,7 +524,7 @@ main(int ac, char **av) | |||
521 | if (no_tty_flag) | 524 | if (no_tty_flag) |
522 | tty_flag = 0; | 525 | tty_flag = 0; |
523 | /* Do not allocate a tty if stdin is not a tty. */ | 526 | /* Do not allocate a tty if stdin is not a tty. */ |
524 | if (!isatty(fileno(stdin))) { | 527 | if (!isatty(fileno(stdin)) && !force_tty_flag) { |
525 | if (tty_flag) | 528 | if (tty_flag) |
526 | fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n"); | 529 | fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n"); |
527 | tty_flag = 0; | 530 | tty_flag = 0; |