summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--entropy.c10
-rw-r--r--session.c4
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 21cd0a20b..5d28c74dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@
10 - 'fixprogs' perl script to eliminate non-working entropy commands, and 10 - 'fixprogs' perl script to eliminate non-working entropy commands, and
11 optionally run 'ent' to measure command entropy 11 optionally run 'ent' to measure command entropy
12 - Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix 12 - Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
13 - Avoid WCOREDUMP complation errors for systems that lack it
14 - Avoid SIGCHLD warnings from entropy commands
13 15
1420000513 1620000513
15 - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz 17 - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz
diff --git a/entropy.c b/entropy.c
index 79ef93ac6..cc7e81527 100644
--- a/entropy.c
+++ b/entropy.c
@@ -35,7 +35,7 @@
35#include <openssl/rand.h> 35#include <openssl/rand.h>
36#include <openssl/sha.h> 36#include <openssl/sha.h>
37 37
38RCSID("$Id: entropy.c,v 1.10 2000/05/17 11:34:08 damien Exp $"); 38RCSID("$Id: entropy.c,v 1.11 2000/05/17 12:08:30 damien Exp $");
39 39
40#ifdef EGD_SOCKET 40#ifdef EGD_SOCKET
41#ifndef offsetof 41#ifndef offsetof
@@ -735,18 +735,26 @@ prng_seed_cleanup(void *junk)
735void 735void
736seed_rng(void) 736seed_rng(void)
737{ 737{
738 void *old_sigchld_handler;
739
738 if (!prng_commands_loaded) { 740 if (!prng_commands_loaded) {
739 if (!prng_read_commands(SSH_PRNG_COMMAND_FILE)) 741 if (!prng_read_commands(SSH_PRNG_COMMAND_FILE))
740 fatal("PRNG initialisation failed -- exiting."); 742 fatal("PRNG initialisation failed -- exiting.");
741 prng_commands_loaded = 1; 743 prng_commands_loaded = 1;
742 } 744 }
743 745
746 /* Make sure some other sigchld handler doesn't reap our entropy */
747 /* commands */
748 old_sigchld_handler = signal(SIGCHLD, SIG_DFL);
749
744 debug("Seeding random number generator."); 750 debug("Seeding random number generator.");
745 debug("OpenSSL random status is now %i\n", RAND_status()); 751 debug("OpenSSL random status is now %i\n", RAND_status());
746 debug("%i bytes from system calls", (int)stir_from_system()); 752 debug("%i bytes from system calls", (int)stir_from_system());
747 debug("%i bytes from programs", (int)stir_from_programs()); 753 debug("%i bytes from programs", (int)stir_from_programs());
748 debug("OpenSSL random status is now %i\n", RAND_status()); 754 debug("OpenSSL random status is now %i\n", RAND_status());
749 755
756 signal(SIGCHLD, old_sigchld_handler);
757
750 if (!RAND_status()) 758 if (!RAND_status())
751 fatal("Couldn't initialise builtin random number generator -- exiting."); 759 fatal("Couldn't initialise builtin random number generator -- exiting.");
752 760
diff --git a/session.c b/session.c
index 480a1635a..23c566050 100644
--- a/session.c
+++ b/session.c
@@ -1473,7 +1473,11 @@ session_exit_message(Session *s, int status)
1473 channel_request_start(s->chanid, 1473 channel_request_start(s->chanid,
1474 "exit-signal", 0); 1474 "exit-signal", 0);
1475 packet_put_int(WTERMSIG(status)); 1475 packet_put_int(WTERMSIG(status));
1476#ifdef WCOREDUMP
1476 packet_put_char(WCOREDUMP(status)); 1477 packet_put_char(WCOREDUMP(status));
1478#else /* WCOREDUMP */
1479 packet_put_char(0);
1480#endif /* WCOREDUMP */
1477 packet_put_cstring(""); 1481 packet_put_cstring("");
1478 packet_put_cstring(""); 1482 packet_put_cstring("");
1479 packet_send(); 1483 packet_send();