Commit 3d0b25f
committed
Unconditionally use libc::getrandom on Illumos and Solaris
Also removes the use of `GRND_RANDOM`, which appears to be based on
outdated staements about the RNGs. For Solaris, see
[this blog post](https://blogs.oracle.com/solaris/post/solaris-new-system-calls-getentropy2-and-getrandom2).
For Illumos, the algorithms are less clear, but I don't see a clear
reason to continue using `GRND_RANDOM`.
I updated the documentation in `getrandom.rs` to full document this
decision and to have a common place listing when `getrandom(2)` became
avalible on each platform. I also updated the main lib.rs docs to point
to the correct man pages.
Note that Solaris 11.3 has a maximum buffer length of 1024 bytes,
while Illumos doesn't have this sort of issue.
Signed-off-by: Joe Richey <joerichey@google.com>1 parent dca4961 commit 3d0b25f
4 files changed
+45
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 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 | + | |
2 | 26 | | |
3 | 27 | | |
4 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
5 | 36 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
9 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| 246 | + | |
| 247 | + | |
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
| |||
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 12 | + | |
27 | 13 | | |
28 | 14 | | |
29 | 15 | | |
| |||
0 commit comments