summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 10f52a073..2de726244 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.95 2001/02/08 19:30:52 itojun Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.96 2001/02/08 22:35:30 markus Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -421,6 +421,7 @@ ssh_exchange_identification(void)
421 debug("Local version string %.100s", client_version_string); 421 debug("Local version string %.100s", client_version_string);
422} 422}
423 423
424/* defaults to 'no' */
424int 425int
425read_yes_or_no(const char *prompt, int defval) 426read_yes_or_no(const char *prompt, int defval)
426{ 427{
@@ -428,6 +429,9 @@ read_yes_or_no(const char *prompt, int defval)
428 FILE *f; 429 FILE *f;
429 int retval = -1; 430 int retval = -1;
430 431
432 if (options.batch_mode)
433 return 0;
434
431 if (isatty(STDIN_FILENO)) 435 if (isatty(STDIN_FILENO))
432 f = stdin; 436 f = stdin;
433 else 437 else