]> andersk Git - openssh.git/blobdiff - ssh-add.c
- (tim) [contrib/cygwin/README] add minires-devel requirement. Patch from
[openssh.git] / ssh-add.c
index 9adec3094419fc9adeaec28ffa2ca68f35b8770f..709a36bc1eca350be7d765b505d0f4f8594b3ffa 100644 (file)
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-add.c,v 1.66 2003/03/05 22:33:43 markus Exp $");
+RCSID("$OpenBSD: ssh-add.c,v 1.70 2004/05/08 00:21:31 djm Exp $");
 
 #include <openssl/evp.h>
 
@@ -47,7 +47,6 @@ RCSID("$OpenBSD: ssh-add.c,v 1.66 2003/03/05 22:33:43 markus Exp $");
 #include "authfd.h"
 #include "authfile.h"
 #include "pathnames.h"
-#include "readpass.h"
 #include "misc.h"
 
 #ifdef HAVE___PROGNAME
@@ -164,18 +163,19 @@ add_file(AuthenticationConnection *ac, const char *filename)
                        if (private != NULL)
                                break;
                        clear_pass();
-                       strlcpy(msg, "Bad passphrase, try again: ", sizeof msg);
+                       snprintf(msg, sizeof msg,
+                           "Bad passphrase, try again for %.200s: ", comment);
                }
        }
 
-       if (ssh_add_identity_constrained(ac, private, comment, lifetime,
-           confirm)) {
+       if (ssh_add_identity_constrained(ac, private, comment, lifetime,
+           confirm)) {
                fprintf(stderr, "Identity added: %s (%s)\n", filename, comment);
                ret = 0;
                if (lifetime != 0)
                        fprintf(stderr,
                            "Lifetime set to %d seconds\n", lifetime);
-               if (confirm != 0)
+               if (confirm != 0)
                        fprintf(stderr,
                            "The user has to confirm each use of the key\n");
        } else if (ssh_add_identity(ac, private, comment)) {
@@ -201,7 +201,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id)
        if (pin == NULL)
                return -1;
 
-       if (ssh_update_card(ac, add, id, pin)) {
+       if (ssh_update_card(ac, add, id, pin, lifetime, confirm)) {
                fprintf(stderr, "Card %s: %s\n",
                    add ? "added" : "removed", id);
                ret = 0;
@@ -318,7 +318,7 @@ main(int argc, char **argv)
        char *sc_reader_id = NULL;
        int i, ch, deleting = 0, ret = 0;
 
-       __progname = get_progname(argv[0]);
+       __progname = ssh_get_progname(argv[0]);
        init_rng();
        seed_rng();
 
This page took 0.03722 seconds and 4 git commands to generate.