diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-add.c | 10 |
2 files changed, 13 insertions, 2 deletions
@@ -104,6 +104,9 @@ | |||
104 | [servconf.c servconf.h ssh.h sshd.c] | 104 | [servconf.c servconf.h ssh.h sshd.c] |
105 | for unprivileged user, group do: | 105 | for unprivileged user, group do: |
106 | pw=getpwnam(SSH_PRIVSEP_USER); do_setusercontext(pw). ok provos@ | 106 | pw=getpwnam(SSH_PRIVSEP_USER); do_setusercontext(pw). ok provos@ |
107 | - stevesk@cvs.openbsd.org 2002/03/20 21:08:08 | ||
108 | [sshd.c] | ||
109 | strerror() on chdir() fail; ok provos@ | ||
107 | - markus@cvs.openbsd.org 2002/03/21 10:21:20 | 110 | - markus@cvs.openbsd.org 2002/03/21 10:21:20 |
108 | [ssh-add.c] | 111 | [ssh-add.c] |
109 | ignore errors for nonexisting default keys in ssh-add, | 112 | ignore errors for nonexisting default keys in ssh-add, |
@@ -7954,4 +7957,4 @@ | |||
7954 | - Wrote replacements for strlcpy and mkdtemp | 7957 | - Wrote replacements for strlcpy and mkdtemp |
7955 | - Released 1.0pre1 | 7958 | - Released 1.0pre1 |
7956 | 7959 | ||
7957 | $Id: ChangeLog,v 1.1955 2002/03/22 03:14:45 mouring Exp $ | 7960 | $Id: ChangeLog,v 1.1956 2002/03/22 03:21:16 mouring 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.51 2002/03/19 10:49:35 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-add.c,v 1.52 2002/03/21 10:21:20 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -310,6 +310,8 @@ main(int argc, char **argv) | |||
310 | if (argc == 0) { | 310 | if (argc == 0) { |
311 | char buf[MAXPATHLEN]; | 311 | char buf[MAXPATHLEN]; |
312 | struct passwd *pw; | 312 | struct passwd *pw; |
313 | struct stat st; | ||
314 | int count = 0; | ||
313 | 315 | ||
314 | if ((pw = getpwuid(getuid())) == NULL) { | 316 | if ((pw = getpwuid(getuid())) == NULL) { |
315 | fprintf(stderr, "No user found with uid %u\n", | 317 | fprintf(stderr, "No user found with uid %u\n", |
@@ -321,9 +323,15 @@ main(int argc, char **argv) | |||
321 | for(i = 0; default_files[i]; i++) { | 323 | for(i = 0; default_files[i]; i++) { |
322 | snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, | 324 | snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir, |
323 | default_files[i]); | 325 | default_files[i]); |
326 | if (stat(buf, &st) < 0) | ||
327 | continue; | ||
324 | if (do_file(ac, deleting, buf) == -1) | 328 | if (do_file(ac, deleting, buf) == -1) |
325 | ret = 1; | 329 | ret = 1; |
330 | else | ||
331 | count++; | ||
326 | } | 332 | } |
333 | if (count == 0) | ||
334 | ret = 1; | ||
327 | } else { | 335 | } else { |
328 | for(i = 0; i < argc; i++) { | 336 | for(i = 0; i < argc; i++) { |
329 | if (do_file(ac, deleting, argv[i]) == -1) | 337 | if (do_file(ac, deleting, argv[i]) == -1) |