summaryrefslogtreecommitdiff
path: root/readpass.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-11-12 22:35:02 +0000
committerDamien Miller <djm@mindrot.org>2019-11-13 10:15:46 +1100
commit4671211068441519011ac0e38c588317f4157ba1 (patch)
tree18048d2ca627cedd24137b7ecb3343f350c3f5f1 /readpass.c
parent5d1c1590d736694f41b03e686045f08fcae20d62 (diff)
upstream: pass SSH_ASKPASS_PROMPT hint to y/n key confirm too
OpenBSD-Commit-ID: 08d46712e5e5f1bad0aea68e7717b7bec1ab8959
Diffstat (limited to 'readpass.c')
-rw-r--r--readpass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/readpass.c b/readpass.c
index 33fc03bb7..b3e799036 100644
--- a/readpass.c
+++ b/readpass.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readpass.c,v 1.55 2019/11/12 22:34:20 djm Exp $ */ 1/* $OpenBSD: readpass.c,v 1.56 2019/11/12 22:35:02 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -75,6 +75,7 @@ ssh_askpass(char *askpass, const char *msg)
75 close(p[0]); 75 close(p[0]);
76 if (dup2(p[1], STDOUT_FILENO) == -1) 76 if (dup2(p[1], STDOUT_FILENO) == -1)
77 fatal("ssh_askpass: dup2: %s", strerror(errno)); 77 fatal("ssh_askpass: dup2: %s", strerror(errno));
78 setenv("SSH_ASKPASS_PROMPT", "confirm", 1); /* hint to UI */
78 execlp(askpass, askpass, msg, (char *)NULL); 79 execlp(askpass, askpass, msg, (char *)NULL);
79 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno)); 80 fatal("ssh_askpass: exec(%s): %s", askpass, strerror(errno));
80 } 81 }