summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/readpass.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-11-12 22:35:02 +0000
committerdjm <djm@openbsd.org>2019-11-12 22:35:02 +0000
commit25104342294931cadc6935c7b24edb8fa4d54e3d (patch)
tree8244feb5bed637731060cc9a0821307da5c609a9 /usr.bin/ssh/readpass.c
parentdd API for performing one-shot notifications via tty or SSH_ASKPASS (diff)
downloadwireguard-openbsd-25104342294931cadc6935c7b24edb8fa4d54e3d.tar.xz
wireguard-openbsd-25104342294931cadc6935c7b24edb8fa4d54e3d.zip
pass SSH_ASKPASS_PROMPT hint to y/n key confirm too
Diffstat (limited to 'usr.bin/ssh/readpass.c')
-rw-r--r--usr.bin/ssh/readpass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/readpass.c b/usr.bin/ssh/readpass.c
index 37ae0a5312f..a93d1fa5461 100644
--- a/usr.bin/ssh/readpass.c
+++ b/usr.bin/ssh/readpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpass.c,v 1.55 2019/11/12 22:34:20 djm Exp $ */
+/* $OpenBSD: readpass.c,v 1.56 2019/11/12 22:35:02 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -72,6 +72,7 @@ ssh_askpass(char *askpass, const char *msg)
close(p[0]);
if (dup2(p[1], STDOUT_FILENO) == -1)
fatal("ssh_askpass: dup2: %s", strerror(errno));
+ setenv("SSH_ASKPASS_PROMPT", "confirm", 1); /* hint to UI */
execlp(askpass, askpass, msg, (char *)NULL);
fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno));
}