- (dtucker) [ssh-rand-helper.c] Don't exit if mkdir fails because the

target already exists.
This commit is contained in:
Darren Tucker 2006-07-05 21:35:48 +10:00
parent db4c54bed1
commit daf6ff4312
2 changed files with 7 additions and 3 deletions

View File

@ -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 $

View File

@ -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);