summaryrefslogtreecommitdiffstats
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-07-05 13:35:48 +0200
committerDarren Tucker <dtucker@zip.com.au>2006-07-05 13:35:48 +0200
commitdaf6ff431264dc15650633c3de190cd6fa1ea710 (patch)
tree5b2cbbf6e4ac1437bea7803d205b485a3cdde3d0 /ssh-rand-helper.c
parent - (dtucker) [INSTALL] Bug #1202: Note when autoconf is required and which (diff)
downloadopenssh-daf6ff431264dc15650633c3de190cd6fa1ea710.tar.xz
openssh-daf6ff431264dc15650633c3de190cd6fa1ea710.zip
- (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 d88a246eb..605de72f9 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);