diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-07-05 21:35:48 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-07-05 21:35:48 +1000 |
commit | daf6ff431264dc15650633c3de190cd6fa1ea710 (patch) | |
tree | 5b2cbbf6e4ac1437bea7803d205b485a3cdde3d0 /ssh-rand-helper.c | |
parent | db4c54bed101d48e0fc844e8b8d37ec025d9f50d (diff) |
- (dtucker) [ssh-rand-helper.c] Don't exit if mkdir fails because the
target already exists.
Diffstat (limited to 'ssh-rand-helper.c')
-rw-r--r-- | ssh-rand-helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index d88a246eb..605de72f9 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c | |||
@@ -573,8 +573,8 @@ prng_write_seedfile(void) | |||
573 | /* Try to ensure that the parent directory is there */ | 573 | /* Try to ensure that the parent directory is there */ |
574 | snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, | 574 | snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, |
575 | _PATH_SSH_USER_DIR); | 575 | _PATH_SSH_USER_DIR); |
576 | if (mkdir(filename, 0700) < 0) | 576 | if (mkdir(filename, 0700) < 0 && errno != EEXIST) |
577 | fatal("mkdir: %s", strerror(errno)); | 577 | fatal("mkdir %.200s: %s", filename, strerror(errno)); |
578 | 578 | ||
579 | snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, | 579 | snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir, |
580 | SSH_PRNG_SEED_FILE); | 580 | SSH_PRNG_SEED_FILE); |