summaryrefslogtreecommitdiff
path: root/ssh-add.c
diff options
context:
space:
mode:
authorhalex@openbsd.org <halex@openbsd.org>2015-02-03 00:34:14 +0000
committerDamien Miller <djm@mindrot.org>2015-02-05 07:42:59 +1100
commit5d34aa94938abb12b877a25be51862757f25d54b (patch)
treec63936c26f9ab318bb0730a8990eb5330e03f40f /ssh-add.c
parentcb3bde373e80902c7d5d0db429f85068d19b2918 (diff)
downloadopenssh-git-5d34aa94938abb12b877a25be51862757f25d54b.tar.gz
upstream commit
slightly extend the passphrase prompt if running with -c in order to give the user a chance to notice if unintentionally running without it wording tweak and ok djm@
Diffstat (limited to 'ssh-add.c')
-rw-r--r--ssh-add.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ssh-add.c b/ssh-add.c
index 676e65d1..d1607138 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.118 2015/01/28 22:36:00 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.119 2015/02/03 00:34:14 halex Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -232,8 +232,8 @@ add_file(int agent_fd, const char *filename, int key_only)
if (private == NULL) {
/* clear passphrase since it did not work */
clear_pass();
- snprintf(msg, sizeof msg, "Enter passphrase for %.200s: ",
- comment);
+ snprintf(msg, sizeof msg, "Enter passphrase for %.200s%s: ",
+ comment, confirm ? " (will confirm each use)" : "");
for (;;) {
pass = read_passphrase(msg, RP_ALLOW_STDIN);
if (strcmp(pass, "") == 0)
@@ -253,7 +253,8 @@ add_file(int agent_fd, const char *filename, int key_only)
}
clear_pass();
snprintf(msg, sizeof msg,
- "Bad passphrase, try again for %.200s: ", comment);
+ "Bad passphrase, try again for %.200s%s: ", comment,
+ confirm ? " (will confirm each use)" : "");
}
}
sshbuf_free(keyblob);