]> git.ipfire.org Git - thirdparty/coreutils.git/commit
maint: use getentropy and new tempname modules
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Jun 2020 05:21:34 +0000 (22:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 1 Jun 2020 05:39:48 +0000 (22:39 -0700)
commitb3ff4113fddd169bff8b237764d9bea428ecb804
tree804eb8d784c8005d653307f7459a9fc291f3896c
parentc229285ceb9a06d83571f411c5adb2fb27b34ebc
maint: use getentropy and new tempname modules

Update gnulib submodule to latest and use its new features.
Gnulib’s new getentropy module means coreutils can now assume
getentropy instead of approximating it, badly in some cases.
Gnulib’s improvements to the tempname module mean coreutils no
longer needs to maintain private patches.
* bootstrap.conf (gnulib_modules): Remove gettimeofday.
* gl/lib/randread.c (NAME_OF_NONCE_DEVICE): Remove.
(get_nonce): Return success indicator.  Remove bytes_bound arg.
All callers changed.  Rewrite by using getentropy instead of
reading the nonce device and falling back on gettimeofday.
Fail if getentropy fails.
(randread_new): Return NULL (setting errno) if get_nonce fails.
All callers changed.
* gl/lib/tempname.c.diff, gl/lib/tempname.h.diff:
* gl/modules/tempname.diff: Remove.
* gl/modules/randread (Depends-on):
Depend on getentropy, not gettimeofday.
* src/ptx.c (swallow_file_in_memory):
* src/shuf.c (read_input):
Adjust to read_file changes in Gnulib.
* src/shred.c (main):
* src/shuf.c (main):
* src/sort.c (random_md5_state_init):
Diagnose the new form of randread_new failures: randread_new can
fail now when !random_source, meaning getentropy failed.
bootstrap.conf
gl/lib/randread.c
gl/lib/tempname.c.diff [deleted file]
gl/lib/tempname.h.diff [deleted file]
gl/modules/randread
gl/modules/tempname.diff [deleted file]
gnulib
src/ptx.c
src/shred.c
src/shuf.c
src/sort.c