mirror of git://anongit.mindrot.org/openssh.git
- Avoid WCOREDUMP complation errors for systems that lack it
- Avoid SIGCHLD warnings from entropy commands
This commit is contained in:
parent
d2c208a2d3
commit
f3c6cf1383
|
@ -10,6 +10,8 @@
|
||||||
- 'fixprogs' perl script to eliminate non-working entropy commands, and
|
- 'fixprogs' perl script to eliminate non-working entropy commands, and
|
||||||
optionally run 'ent' to measure command entropy
|
optionally run 'ent' to measure command entropy
|
||||||
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
|
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
|
||||||
|
- Avoid WCOREDUMP complation errors for systems that lack it
|
||||||
|
- Avoid SIGCHLD warnings from entropy commands
|
||||||
|
|
||||||
20000513
|
20000513
|
||||||
- Fix for non-recognised DSA keys from Arkadiusz Miskiewicz
|
- Fix for non-recognised DSA keys from Arkadiusz Miskiewicz
|
||||||
|
|
10
entropy.c
10
entropy.c
|
@ -35,7 +35,7 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
|
|
||||||
RCSID("$Id: entropy.c,v 1.10 2000/05/17 11:34:08 damien Exp $");
|
RCSID("$Id: entropy.c,v 1.11 2000/05/17 12:08:30 damien Exp $");
|
||||||
|
|
||||||
#ifdef EGD_SOCKET
|
#ifdef EGD_SOCKET
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
|
@ -735,18 +735,26 @@ prng_seed_cleanup(void *junk)
|
||||||
void
|
void
|
||||||
seed_rng(void)
|
seed_rng(void)
|
||||||
{
|
{
|
||||||
|
void *old_sigchld_handler;
|
||||||
|
|
||||||
if (!prng_commands_loaded) {
|
if (!prng_commands_loaded) {
|
||||||
if (!prng_read_commands(SSH_PRNG_COMMAND_FILE))
|
if (!prng_read_commands(SSH_PRNG_COMMAND_FILE))
|
||||||
fatal("PRNG initialisation failed -- exiting.");
|
fatal("PRNG initialisation failed -- exiting.");
|
||||||
prng_commands_loaded = 1;
|
prng_commands_loaded = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure some other sigchld handler doesn't reap our entropy */
|
||||||
|
/* commands */
|
||||||
|
old_sigchld_handler = signal(SIGCHLD, SIG_DFL);
|
||||||
|
|
||||||
debug("Seeding random number generator.");
|
debug("Seeding random number generator.");
|
||||||
debug("OpenSSL random status is now %i\n", RAND_status());
|
debug("OpenSSL random status is now %i\n", RAND_status());
|
||||||
debug("%i bytes from system calls", (int)stir_from_system());
|
debug("%i bytes from system calls", (int)stir_from_system());
|
||||||
debug("%i bytes from programs", (int)stir_from_programs());
|
debug("%i bytes from programs", (int)stir_from_programs());
|
||||||
debug("OpenSSL random status is now %i\n", RAND_status());
|
debug("OpenSSL random status is now %i\n", RAND_status());
|
||||||
|
|
||||||
|
signal(SIGCHLD, old_sigchld_handler);
|
||||||
|
|
||||||
if (!RAND_status())
|
if (!RAND_status())
|
||||||
fatal("Couldn't initialise builtin random number generator -- exiting.");
|
fatal("Couldn't initialise builtin random number generator -- exiting.");
|
||||||
|
|
||||||
|
|
|
@ -1473,7 +1473,11 @@ session_exit_message(Session *s, int status)
|
||||||
channel_request_start(s->chanid,
|
channel_request_start(s->chanid,
|
||||||
"exit-signal", 0);
|
"exit-signal", 0);
|
||||||
packet_put_int(WTERMSIG(status));
|
packet_put_int(WTERMSIG(status));
|
||||||
|
#ifdef WCOREDUMP
|
||||||
packet_put_char(WCOREDUMP(status));
|
packet_put_char(WCOREDUMP(status));
|
||||||
|
#else /* WCOREDUMP */
|
||||||
|
packet_put_char(0);
|
||||||
|
#endif /* WCOREDUMP */
|
||||||
packet_put_cstring("");
|
packet_put_cstring("");
|
||||||
packet_put_cstring("");
|
packet_put_cstring("");
|
||||||
packet_send();
|
packet_send();
|
||||||
|
|
Loading…
Reference in New Issue