blob: eecf9202674376a2ceb1481863b8876940a9b48c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- 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;
|