summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-11-30 07:02:35 +0000
committermarkus <markus@openbsd.org>2000-11-30 07:02:35 +0000
commit43a2888009bbb03a912f51d1c1b1fe10dc724336 (patch)
treec58a582fad90e44addf587da9397c148b2f49fb8
parentx509_hash() should also ignore the id length (for matching purposes) (diff)
downloadwireguard-openbsd-43a2888009bbb03a912f51d1c1b1fe10dc724336.tar.xz
wireguard-openbsd-43a2888009bbb03a912f51d1c1b1fe10dc724336.zip
check -T before isatty()
-rw-r--r--usr.bin/ssh/ssh.c8
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);