Index: readpass.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/readpass.c,v
retrieving revision 1.29
diff -u -p -r1.29 readpass.c
--- readpass.c	5 Nov 2004 09:38:03 -0000	1.29
+++ readpass.c	23 Apr 2005 09:15:58 -0000
@@ -107,14 +107,18 @@ read_passphrase(const char *prompt, int 
 		use_askpass = 1;
 	else if (flags & RP_ALLOW_STDIN) {
 		if (!isatty(STDIN_FILENO))
+			debug("read_passphrase: stdin is not a tty");
 			use_askpass = 1;
 	} else {
 		rppflags |= RPP_REQUIRE_TTY;
 		ttyfd = open(_PATH_TTY, O_RDWR);
 		if (ttyfd >= 0)
 			close(ttyfd);
-		else
+		else {
+			debug("read_passphrase: can't open %s: %s", _PATH_TTY,
+			    strerror(errno));
 			use_askpass = 1;
+		}
 	}
 
 	if ((flags & RP_USE_ASKPASS) && getenv("DISPLAY") == NULL)
