[openssh-commits] [openssh] 01/01: upstream: mention in comment that read_passphrase(..., RP_ALLOW_STDIN)

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Jul 23 15:58:04 AEST 2021


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 03190d10980c6fc9124e988cb2df13101f266507
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Jul 23 05:56:47 2021 +0000

    upstream: mention in comment that read_passphrase(..., RP_ALLOW_STDIN)
    
    will try to use askpass first. bz3314
    
    convert a couple of debug() -> debug_f() while here
    
    OpenBSD-Commit-ID: c7e812aebc28fcc5db06d4710e0f73613dee545c
---
 readpass.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/readpass.c b/readpass.c
index 9c7476c1..39af25c8 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.68 2020/11/10 07:46:20 claudio Exp $ */
+/* $OpenBSD: readpass.c,v 1.69 2021/07/23 05:56:47 djm Exp $ */
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
  *
@@ -117,7 +117,7 @@ ssh_askpass(char *askpass, const char *msg, const char *env_hint)
  * Reads a passphrase from /dev/tty with echo turned off/on.  Returns the
  * passphrase (allocated with xmalloc).  Exits if EOF is encountered. If
  * RP_ALLOW_STDIN is set, the passphrase will be read from stdin if no
- * tty is available
+ * tty is or askpass program is available
  */
 char *
 read_passphrase(const char *prompt, int flags)
@@ -146,7 +146,7 @@ read_passphrase(const char *prompt, int flags)
 		use_askpass = 1;
 	else if (flags & RP_ALLOW_STDIN) {
 		if (!isatty(STDIN_FILENO)) {
-			debug("read_passphrase: stdin is not a tty");
+			debug_f("stdin is not a tty");
 			use_askpass = 1;
 		}
 	} else {
@@ -162,7 +162,7 @@ read_passphrase(const char *prompt, int flags)
 			(void)write(ttyfd, &cr, 1);
 			close(ttyfd);
 		} else {
-			debug("read_passphrase: can't open %s: %s", _PATH_TTY,
+			debug_f("can't open %s: %s", _PATH_TTY,
 			    strerror(errno));
 			use_askpass = 1;
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list