=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-add.c,v retrieving revision 1.66 retrieving revision 1.66.2.2 diff -u -r1.66 -r1.66.2.2 --- src/usr.bin/ssh/ssh-add.c 2003/03/05 22:33:43 1.66 +++ src/usr.bin/ssh/ssh-add.c 2004/03/04 18:18:16 1.66.2.2 @@ -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.66.2.2 2004/03/04 18:18:16 brad Exp $"); #include @@ -158,18 +158,19 @@ 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)) { @@ -195,7 +196,7 @@ 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;