summaryrefslogtreecommitdiff
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-07-05 21:35:48 +1000
committerDarren Tucker <dtucker@zip.com.au>2006-07-05 21:35:48 +1000
commitdaf6ff431264dc15650633c3de190cd6fa1ea710 (patch)
tree5b2cbbf6e4ac1437bea7803d205b485a3cdde3d0 /ssh-rand-helper.c
parentdb4c54bed101d48e0fc844e8b8d37ec025d9f50d (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index d88a246e..605de72f 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -573,8 +573,8 @@ prng_write_seedfile(void)
/* Try to ensure that the parent directory is there */
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
_PATH_SSH_USER_DIR);
- if (mkdir(filename, 0700) < 0)
- fatal("mkdir: %s", strerror(errno));
+ if (mkdir(filename, 0700) < 0 && errno != EEXIST)
+ fatal("mkdir %.200s: %s", filename, strerror(errno));
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
SSH_PRNG_SEED_FILE);