- (dtucker) [ssh-rand-helper.c] Check return code of mkdir and fix file
pointer leak. From kjhall at us.ibm.com, found by coverity.
This commit is contained in:
parent
73373877db
commit
f58b29d515
|
@ -1,3 +1,7 @@
|
||||||
|
20050517
|
||||||
|
- (dtucker) [ssh-rand-helper.c] Check return code of mkdir and fix file
|
||||||
|
pointer leak. From kjhall at us.ibm.com, found by coverity.
|
||||||
|
|
||||||
20050515
|
20050515
|
||||||
- (dtucker) [openbsd-compat/getrrsetbyname.c] Use _compat_res instead of
|
- (dtucker) [openbsd-compat/getrrsetbyname.c] Use _compat_res instead of
|
||||||
_res, prevents problems on some platforms that have _res as a global but
|
_res, prevents problems on some platforms that have _res as a global but
|
||||||
|
@ -4621,4 +4625,4 @@
|
||||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.4328 2006/05/15 07:24:25 dtucker Exp $
|
$Id: ChangeLog,v 1.4329 2006/05/17 12:24:56 dtucker Exp $
|
||||||
|
|
|
@ -573,7 +573,8 @@ prng_write_seedfile(void)
|
||||||
/* Try to ensure that the parent directory is there */
|
/* Try to ensure that the parent directory is there */
|
||||||
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
|
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
|
||||||
_PATH_SSH_USER_DIR);
|
_PATH_SSH_USER_DIR);
|
||||||
mkdir(filename, 0700);
|
if (mkdir(filename, 0700) < 0)
|
||||||
|
fatal("mkdir: %s", strerror(errno));
|
||||||
|
|
||||||
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
|
snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
|
||||||
SSH_PRNG_SEED_FILE);
|
SSH_PRNG_SEED_FILE);
|
||||||
|
@ -782,6 +783,7 @@ prng_read_commands(char *cmdfilename)
|
||||||
debug("Loaded %d entropy commands from %.100s", cur_cmd,
|
debug("Loaded %d entropy commands from %.100s", cur_cmd,
|
||||||
cmdfilename);
|
cmdfilename);
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
|
return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue