summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-add.c
diff options
context:
space:
mode:
authorAlexander Hall <halex@cvs.openbsd.org>2015-02-03 00:34:15 +0000
committerAlexander Hall <halex@cvs.openbsd.org>2015-02-03 00:34:15 +0000
commit49790d24757cc7de4420a38867673763970249dd (patch)
tree61caf6d36cfdea550d6d8457ddc7c5a118c7ed25 /usr.bin/ssh/ssh-add.c
parent08077a21cef50eadf76c896f70fca939f7e524cc (diff)
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 'usr.bin/ssh/ssh-add.c')
-rw-r--r--usr.bin/ssh/ssh-add.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index 740fa8f712e..0e76c39975b 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/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
@@ -224,8 +224,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)
@@ -245,7 +245,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);