]> andersk Git - openssh.git/commitdiff
- Avoid WCOREDUMP complation errors for systems that lack it
authordamien <damien>
Wed, 17 May 2000 12:08:29 +0000 (12:08 +0000)
committerdamien <damien>
Wed, 17 May 2000 12:08:29 +0000 (12:08 +0000)
 - Avoid SIGCHLD warnings from entropy commands

ChangeLog
entropy.c
session.c

index 21cd0a20b2c709a2e7fe022f1ae3fedb17f2c7c0..5d28c74ddbca2b445f629431ef53c2071fd5fe9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@
   - 'fixprogs' perl script to eliminate non-working entropy commands, and
         optionally run 'ent' to measure command entropy
  - 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
  - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz 
index fc7e209dee03a773adecab67a1b90726cc5b7ab5..2e0c1c50aeb6e5c1ac21989a5049260d98f60ed7 100644 (file)
--- a/entropy.c
+++ b/entropy.c
@@ -735,18 +735,26 @@ prng_seed_cleanup(void *junk)
 void
 seed_rng(void)
 {
+       void *old_sigchld_handler;
+       
        if (!prng_commands_loaded) {
                if (!prng_read_commands(SSH_PRNG_COMMAND_FILE))
                        fatal("PRNG initialisation failed -- exiting.");
                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("OpenSSL random status is now %i\n", RAND_status());
        debug("%i bytes from system calls", (int)stir_from_system());
        debug("%i bytes from programs", (int)stir_from_programs());
        debug("OpenSSL random status is now %i\n", RAND_status());
 
+       signal(SIGCHLD, old_sigchld_handler);
+
        if (!RAND_status())
                fatal("Couldn't initialise builtin random number generator -- exiting.");
 
index 480a1635a49aeecca0fbaa564bde1d06b3477de4..23c5660508af82098b38f9ed80d53b86df8b3150 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1473,7 +1473,11 @@ session_exit_message(Session *s, int status)
                channel_request_start(s->chanid,
                    "exit-signal", 0);
                packet_put_int(WTERMSIG(status));
+#ifdef WCOREDUMP
                packet_put_char(WCOREDUMP(status));
+#else /* WCOREDUMP */
+               packet_put_char(0);
+#endif /* WCOREDUMP */
                packet_put_cstring("");
                packet_put_cstring("");
                packet_send();
This page took 0.209007 seconds and 5 git commands to generate.