]> andersk Git - openssh.git/blobdiff - entropy.c
- jakob@cvs.openbsd.org 2001/08/02 16:14:05
[openssh.git] / entropy.c
index 44440d974cb6830a462ad34dba4ce1cf13a6d3b6..9588f792946f413a7d7aba2aa2e28691acabe46f 100644 (file)
--- a/entropy.c
+++ b/entropy.c
@@ -68,7 +68,7 @@ RCSID("$Id$");
 # define SAVED_IDS_WORK_WITH_SETEUID
 #endif
 
-void
+static void
 check_openssl_version(void) 
 {
        if (SSLeay() != OPENSSL_VERSION_NUMBER)
@@ -182,7 +182,7 @@ done:
 #else /* !USE_PRNGD */
 #ifdef RANDOM_POOL
 /* Collect entropy from /dev/urandom or pipe */
-int
+static int
 get_random_bytes(unsigned char *buf, int len)
 {
        int random_pool;
@@ -505,7 +505,9 @@ hash_output_from_command(entropy_source_t *src, char *hash)
                        break;
                case 1:
                        /* command input */
-                       bytes_read = read(p[0], buf, sizeof(buf));
+                       do {
+                               bytes_read = read(p[0], buf, sizeof(buf));
+                       } while (bytes_read == -1 && errno == EINTR);
                        RAND_add(&bytes_read, sizeof(&bytes_read), 0.0);
                        if (bytes_read == -1) {
                                error_abort = 1;
This page took 1.27549 seconds and 4 git commands to generate.