diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-add.c | 14 |
2 files changed, 13 insertions, 6 deletions
@@ -28,6 +28,9 @@ | |||
28 | - stevesk@cvs.openbsd.org 2002/01/27 18:08:17 | 28 | - stevesk@cvs.openbsd.org 2002/01/27 18:08:17 |
29 | [ssh.c] | 29 | [ssh.c] |
30 | handle simple case to identify FamilyLocal display; ok markus@ | 30 | handle simple case to identify FamilyLocal display; ok markus@ |
31 | - markus@cvs.openbsd.org 2002/01/29 14:27:57 | ||
32 | [ssh-add.c] | ||
33 | exit 2 if no agent, exit 1 if list fails; debian#61078; ok djm@ | ||
31 | 34 | ||
32 | 20020130 | 35 | 20020130 |
33 | - (djm) Delay PRNG seeding until we need it in ssh-keygen, from markus@ | 36 | - (djm) Delay PRNG seeding until we need it in ssh-keygen, from markus@ |
@@ -7430,4 +7433,4 @@ | |||
7430 | - Wrote replacements for strlcpy and mkdtemp | 7433 | - Wrote replacements for strlcpy and mkdtemp |
7431 | - Released 1.0pre1 | 7434 | - Released 1.0pre1 |
7432 | 7435 | ||
7433 | $Id: ChangeLog,v 1.1806 2002/02/05 01:12:09 djm Exp $ | 7436 | $Id: ChangeLog,v 1.1807 2002/02/05 01:12:49 djm Exp $ |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: ssh-add.c,v 1.49 2001/12/24 07:29:43 deraadt Exp $"); | 38 | RCSID("$OpenBSD: ssh-add.c,v 1.50 2002/01/29 14:27:57 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -187,7 +187,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id) | |||
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | static void | 190 | static int |
191 | list_identities(AuthenticationConnection *ac, int do_fp) | 191 | list_identities(AuthenticationConnection *ac, int do_fp) |
192 | { | 192 | { |
193 | Key *key; | 193 | Key *key; |
@@ -215,8 +215,11 @@ list_identities(AuthenticationConnection *ac, int do_fp) | |||
215 | xfree(comment); | 215 | xfree(comment); |
216 | } | 216 | } |
217 | } | 217 | } |
218 | if (!had_identities) | 218 | if (!had_identities) { |
219 | printf("The agent has no identities.\n"); | 219 | printf("The agent has no identities.\n"); |
220 | return -1; | ||
221 | } | ||
222 | return 0; | ||
220 | } | 223 | } |
221 | 224 | ||
222 | static int | 225 | static int |
@@ -266,13 +269,14 @@ main(int argc, char **argv) | |||
266 | ac = ssh_get_authentication_connection(); | 269 | ac = ssh_get_authentication_connection(); |
267 | if (ac == NULL) { | 270 | if (ac == NULL) { |
268 | fprintf(stderr, "Could not open a connection to your authentication agent.\n"); | 271 | fprintf(stderr, "Could not open a connection to your authentication agent.\n"); |
269 | exit(1); | 272 | exit(2); |
270 | } | 273 | } |
271 | while ((ch = getopt(argc, argv, "lLdDe:s:")) != -1) { | 274 | while ((ch = getopt(argc, argv, "lLdDe:s:")) != -1) { |
272 | switch (ch) { | 275 | switch (ch) { |
273 | case 'l': | 276 | case 'l': |
274 | case 'L': | 277 | case 'L': |
275 | list_identities(ac, ch == 'l' ? 1 : 0); | 278 | if (list_identities(ac, ch == 'l' ? 1 : 0) == -1) |
279 | ret = 1; | ||
276 | goto done; | 280 | goto done; |
277 | break; | 281 | break; |
278 | case 'd': | 282 | case 'd': |