- (dtucker) [ssh-rand-helper.c] Don't exit if mkdir fails because the
target already exists.
diff --git a/ChangeLog b/ChangeLog
index 1b4ac88..8f7d745 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20060705
+ - (dtucker) [ssh-rand-helper.c] Don't exit if mkdir fails because the
+ target already exists.
+
20060630
- (dtucker) [openbsd-compat/openbsd-compat.h] SNPRINTF_CONST for snprintf
declaration too. Patch from russ at sludge.net.
@@ -4720,4 +4724,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4353 2006/06/30 06:20:58 dtucker Exp $
+$Id: ChangeLog,v 1.4354 2006/07/05 11:35:48 dtucker Exp $
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index d88a246..605de72 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -573,8 +573,8 @@
/* 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);