Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris: consistantly use /dev/random source #310

Merged
merged 1 commit into from Oct 23, 2022
Merged

Solaris: consistantly use /dev/random source #310

merged 1 commit into from Oct 23, 2022

Commits on Oct 23, 2022

  1. Solaris: consistantly use /dev/random source

    On Solaris, we opt to use /dev/random source instead of /dev/urandom due
    to reasons explained in the comments and
    [in this Solaris blog post](https://blogs.oracle.com/solaris/post/solaris-new-system-calls-getentropy2-and-getrandom2).
    
    However, we haven't been making the same choice when getting randomness
    via the `getrandom(2)` function, as we just pass `0` for the flags. We
    [used to](https://github.com/rust-random/rand/pull/730/files#diff-694d4302a3ff2a976f2fbd34bc05ada22ee61a4e21d2d985beab27f7a809268fR151)
    always set `GRND_RANDOM`, but that was removed in the move from `OsRng`
    to this crate.
    
    For context, rust-random/rand#730,
    #9, and
    #51 are the major changes
    to the Solaris/Illumos implementation over the years.
    
    See the solaris documentation for:
    - [`getrandom(2)`](https://docs.oracle.com/cd/E88353_01/html/E37841/getrandom-2.html)
    - [`urandom(4)`](https://docs.oracle.com/cd/E88353_01/html/E37851/urandom-4d.html)
    
    I also updated the doucmentation to better reflect when
    [Illumos added the `getrandom(2)` function](https://www.illumos.org/issues/9971#change-23483).
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed Oct 23, 2022
    Copy the full SHA
    a524072 View commit details
    Browse the repository at this point in the history