summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--readpass.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 68790ca14..23b495f52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,10 @@
31 [ssh.c] 31 [ssh.c]
32 don't allocate a pty when -n flag (/dev/null stdin) is set, patch from 32 don't allocate a pty when -n flag (/dev/null stdin) is set, patch from
33 ignasi.roca AT fujitsu-siemens.com (bz #829); ok dtucker@ 33 ignasi.roca AT fujitsu-siemens.com (bz #829); ok dtucker@
34 - dtucker@cvs.openbsd.org 2005/04/23 23:43:47
35 [readpass.c]
36 Add debug message if read_passphrase can't open /dev/tty; bz #471;
37 ok djm@
34 38
3520050524 3920050524
36 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] 40 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
@@ -2530,4 +2534,4 @@
2530 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2534 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2531 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2535 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2532 2536
2533$Id: ChangeLog,v 1.3769 2005/05/26 02:05:05 djm Exp $ 2537$Id: ChangeLog,v 1.3770 2005/05/26 02:05:28 djm Exp $
diff --git a/readpass.c b/readpass.c
index c2bacdcd4..a193d0368 100644
--- a/readpass.c
+++ b/readpass.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: readpass.c,v 1.31 2004/10/29 22:53:56 djm Exp $"); 26RCSID("$OpenBSD: readpass.c,v 1.32 2005/04/23 23:43:47 dtucker Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29#include "misc.h" 29#include "misc.h"
@@ -107,14 +107,18 @@ read_passphrase(const char *prompt, int flags)
107 use_askpass = 1; 107 use_askpass = 1;
108 else if (flags & RP_ALLOW_STDIN) { 108 else if (flags & RP_ALLOW_STDIN) {
109 if (!isatty(STDIN_FILENO)) 109 if (!isatty(STDIN_FILENO))
110 debug("read_passphrase: stdin is not a tty");
110 use_askpass = 1; 111 use_askpass = 1;
111 } else { 112 } else {
112 rppflags |= RPP_REQUIRE_TTY; 113 rppflags |= RPP_REQUIRE_TTY;
113 ttyfd = open(_PATH_TTY, O_RDWR); 114 ttyfd = open(_PATH_TTY, O_RDWR);
114 if (ttyfd >= 0) 115 if (ttyfd >= 0)
115 close(ttyfd); 116 close(ttyfd);
116 else 117 else {
118 debug("read_passphrase: can't open %s: %s", _PATH_TTY,
119 strerror(errno));
117 use_askpass = 1; 120 use_askpass = 1;
121 }
118 } 122 }
119 123
120 if ((flags & RP_USE_ASKPASS) && getenv("DISPLAY") == NULL) 124 if ((flags & RP_USE_ASKPASS) && getenv("DISPLAY") == NULL)