aboutsummaryrefslogtreecommitdiff
path: root/src/rc/meson.build
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-03-24 22:07:16 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2022-03-26 19:16:27 -0500
commit076c2552aeff88a27fe275dfaae61dedf4bb4bd5 (patch)
treeff7a18f569e7b433486a67c982f16194f35eb975 /src/rc/meson.build
parent270e5c6828577e50830fd3b5662f2b3ec4fb6772 (diff)
Use seedrng for seeding the random number generator
The RNG can't actually be seeded from a shell script, due to the reliance on ioctls. For this reason, the seedrng project provides a basic script meant to be copy and pasted into projects like OpenRC and tweaked as needed: https://git.zx2c4.com/seedrng/about/ This commit imports it into OpenRC and wires up /etc/init.d/urandom to call it. It shouldn't be called by other things on the system, so it lives in rc_sbindir. Closes #506. Closes #507. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/rc/meson.build')
-rw-r--r--src/rc/meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rc/meson.build b/src/rc/meson.build
index 8fdf3ac3..b724c51f 100644
--- a/src/rc/meson.build
+++ b/src/rc/meson.build
@@ -268,7 +268,15 @@ if os == 'Linux'
link_with: [libeinfo,librc],
install: true,
install_dir: rc_bindir)
- endif
+
+ executable('seedrng',
+ ['seedrng.c'],
+ c_args : cc_branding_flags,
+ include_directories: [incdir, einfo_incdir, rc_incdir],
+ link_with: [libeinfo, librc],
+ install: true,
+ install_dir: rc_sbindir)
+endif
executable('shell_var',
['shell_var.c'],