diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-11-30 07:02:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-11-30 07:02:36 +0000 |
commit | 5a9e7a709a92762c912df7c38e753af2ebb96793 (patch) | |
tree | 7797adfca16f3790645c3699414626dd671ab151 /usr.bin/ssh/ssh.c | |
parent | f50ea1f0c3181ec05eb263c19abaa2d2a6a3b23f (diff) |
check -T before isatty()
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 03b7539cc62..a1e9846c5fc 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.74 2000/11/23 21:03:47 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.75 2000/11/30 07:02:35 markus Exp $"); #include <openssl/evp.h> #include <openssl/dsa.h> @@ -504,15 +504,15 @@ main(int ac, char **av) if (buffer_len(&command) == 0) tty_flag = 1; + /* Force no tty*/ + if (no_tty_flag) + tty_flag = 0; /* Do not allocate a tty if stdin is not a tty. */ if (!isatty(fileno(stdin))) { if (tty_flag) fprintf(stderr, "Pseudo-terminal will not be allocated because stdin is not a terminal.\n"); tty_flag = 0; } - /* force */ - if (no_tty_flag) - tty_flag = 0; /* Get user data. */ pw = getpwuid(original_real_uid); |