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

csrand(): Use POSIX read(2) instead of the heavier stdio #1119

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

alejandro-colomar
Copy link
Collaborator

@alejandro-colomar alejandro-colomar commented Nov 12, 2024


Revisions:

v1b
  • Rebase
$ git range-diff master..gh/csrand shadow/master..csrand 
1:  83995494 = 1:  71610097 lib/csrand.c: csrand(): Use read(2) instead of fread(2)

@alejandro-colomar alejandro-colomar marked this pull request as ready for review November 12, 2024 14:29
@alejandro-colomar alejandro-colomar force-pushed the csrand branch 2 times, most recently from 745ec54 to 8399549 Compare November 12, 2024 14:35
@alejandro-colomar alejandro-colomar changed the title csrand(): Use POSIX read(2) instead of the heavier stdio, and improve error handling csrand(): Use POSIX read(2) instead of the heavier stdio Nov 12, 2024
We don't need the heavy stdio for getting a few bytes from
</dev/urandom>.  Let's use the simpler POSIX API.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
@hallyn hallyn merged commit 1d64565 into shadow-maint:master Dec 2, 2024
9 checks passed
@alejandro-colomar alejandro-colomar deleted the csrand branch December 2, 2024 09:13
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.

2 participants