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

Fallback to old-style entropy count if ioctl returns ENOSYS #25

Merged
merged 2 commits into from
Oct 17, 2019

Conversation

dsprenkels
Copy link
Owner

On the MIPS platform, the GETRNDENTCNT ioctl on /dev/urandom gives back an ENOSYS error, even if linux/random.h is correctly included. I am not sure if this is even documented by the relevant man pages.

In any case, when this happens we will fall back to the strategy where we read from /proc/sys/kernel/random/entropy_avail.

@dsprenkels dsprenkels force-pushed the issue_22 branch 2 times, most recently from f035751 to 729fab1 Compare October 17, 2019 09:35
When ioctl returns a ENOSYS error, we will fall back to reading
from the /proc/sys/kernel/random/entropy_avail file.

This commit fixes issue 22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant