From 5d34aa94938abb12b877a25be51862757f25d54b Mon Sep 17 00:00:00 2001 From: "halex@openbsd.org" Date: Tue, 3 Feb 2015 00:34:14 +0000 Subject: 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@ --- ssh-add.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ssh-add.c') 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 * Copyright (c) 1995 Tatu Ylonen , 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); -- cgit v1.2.1