mirror of
https://github.com/troglobit/finit.git
synced 2026-10-22 11:36:07 +00:00
Improve urandom plugin for embedded systems w/o random seed.
For embedded systems with no initial random seed, usually stored in /var/lib/urandom/urandom-seed on desktops, servers and laptops, we now provide an initial seed file using a built-in PRNG. Also, let the configure script default to *enable* the random seeding at boot, granted the urandom plugin is enabled. We should encourage users to properly seed their random, for security reasons. Moreover, the plugin did not properly regenerate the random seed on reboot, or shutdown, this patch also rectifies that problem. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
369fcf2100
commit
a33478d563
3 files changed
+48
-11
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <utmp.h>
|
||||
|
||||
#include "../config.h"
|
||||
#include "../finit.h"
|
||||
#include "../helpers.h"
|
||||
#include "../plugin.h"
|
||||
@@ -45,6 +46,7 @@ static void setup(void *UNUSED(arg))
|
||||
makedir("/var/lib", 0755);
|
||||
makedir("/var/lib/misc", 0755);
|
||||
makedir("/var/lib/alarm", 0755);
|
||||
makedir("/var/lib/urandom",0755);
|
||||
makedir("/var/lock", 0755);
|
||||
makedir("/var/log", 0755);
|
||||
makedir("/var/mail", 0755);
|
||||
|
||||
Reference in new issue
Block a user