diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-04-21 11:47:20 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-04-21 11:47:20 +0000 |
commit | 669cbf66fe301ad1daf2bd426cd98e85331933a6 (patch) | |
tree | 5112c085c07b5093392c358f73292d4273abe22f /usr.bin/ssh/ssh.c | |
parent | 097defb31fca8d93b7d0f0016f418139ba1ee146 (diff) |
don't allocate a pty when -n flag (/dev/null stdin) is set, patch from
ignasi.roca AT fujitsu-siemens.com (bz #829); ok dtucker@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 2f14778a393..cc74ddda878 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.235 2005/04/06 12:26:06 dtucker Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.236 2005/04/21 11:47:19 djm Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -545,7 +545,7 @@ again: if (no_tty_flag) tty_flag = 0; /* Do not allocate a tty if stdin is not a tty. */ - if (!isatty(fileno(stdin)) && !force_tty_flag) { + if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { if (tty_flag) logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); tty_flag = 0; |