- (djm) Only write random seed file at exit
This commit is contained in:
parent
42202bc8cf
commit
21de450853
|
@ -1,3 +1,6 @@
|
||||||
|
20010117
|
||||||
|
- (djm) Only write random seed file at exit
|
||||||
|
|
||||||
20010115
|
20010115
|
||||||
- (bal) sftp-server.c change to use chmod() if fchmod() does not exist.
|
- (bal) sftp-server.c change to use chmod() if fchmod() does not exist.
|
||||||
- (bal) utimes() support via utime() interface on machine that lack utimes().
|
- (bal) utimes() support via utime() interface on machine that lack utimes().
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
# include <floatingpoint.h>
|
# include <floatingpoint.h>
|
||||||
#endif /* HAVE_FLOATINGPOINT_H */
|
#endif /* HAVE_FLOATINGPOINT_H */
|
||||||
|
|
||||||
RCSID("$Id: entropy.c,v 1.22 2000/11/24 23:09:32 djm Exp $");
|
RCSID("$Id: entropy.c,v 1.23 2001/01/16 22:37:15 djm Exp $");
|
||||||
|
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
# define offsetof(type, member) ((size_t) &((type *)0)->member)
|
# define offsetof(type, member) ((size_t) &((type *)0)->member)
|
||||||
|
@ -601,12 +601,7 @@ prng_read_seedfile(void) {
|
||||||
debug("loading PRNG seed from file %.100s", filename);
|
debug("loading PRNG seed from file %.100s", filename);
|
||||||
|
|
||||||
if (!prng_check_seedfile(filename)) {
|
if (!prng_check_seedfile(filename)) {
|
||||||
verbose("Random seed file not found, creating new");
|
verbose("Random seed file not found or not valid, ignoring.");
|
||||||
prng_write_seedfile();
|
|
||||||
|
|
||||||
/* Reseed immediatly */
|
|
||||||
(void)stir_from_system();
|
|
||||||
(void)stir_from_programs();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue