1234567891011121314151617181920212223242526 |
- --- corosync-1.4.1.orig/tools/corosync-keygen.c 2011-07-26 10:08:43.000000000 +0200
- +++ corosync-1.4.1/tools/corosync-keygen.c 2011-10-04 21:03:05.000000000 +0200
- @@ -65,11 +65,11 @@ int main (void) {
- }
- }
-
- - printf ("Gathering %lu bits for key from /dev/random.\n", (unsigned long)(sizeof (key) * 8));
- + printf ("Gathering %lu bits for key from /dev/urandom.\n", (unsigned long)(sizeof (key) * 8));
- printf ("Press keys on your keyboard to generate entropy.\n");
- - random_fd = open ("/dev/random", O_RDONLY);
- + random_fd = open ("/dev/urandom", O_RDONLY);
- if (random_fd == -1) {
- - perror ("Is /dev/random present? Opening /dev/random");
- + perror ("Is /dev/urandom present? Opening /dev/urandom");
- exit (errno);
- }
-
- @@ -81,7 +81,7 @@ int main (void) {
- retry_read:
- res = read (random_fd, &key[bytes_read], sizeof (key) - bytes_read);
- if (res == -1) {
- - perror ("Could not read /dev/random");
- + perror ("Could not read /dev/urandom");
- exit (errno);
- }
- bytes_read += res;
|