You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Etienne CHAMPETIER 3946a55291 base-files: seed /dev/urandom
This commit:
1) seed /dev/urandom with the saved seeds as early as possible
   (see /lib/preinit/81_urandom_seed)
2) save a seed at /etc/urandom.seed if it doesn't exists
3) save a new seed each boot at "system.@system[0].urandom_seed"
   (see /etc/init.d/urandom_seed)

We use getrandom() so we are sure /dev/urandom pool is initialized

Seed size is 512 bytes (ie /proc/sys/kernel/random/poolsize / 8)
it's the same size as in ubuntu 14.04 and all systemd systems

Seeding /dev/urandom doesn't change entropy estimation, so we still have
"random: ubus urandom read with 4 bits of entropy available"
messages in the logs, but we can now ignore them if
after "urandom-seed: Seeding with ..." message

Saving a new seed on each boot is disabled by default to avoid too much
writes without user consent

v2: log preinit messages to /dev/kmsg
v3: use non generic function name for logging, as /lib/preinit/ files
    are all sourced together in /etc/preinit
v4: after a lot of discussion on the ML, use a uci config param
v5: config param is now the path of the seed

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
..
board.d base-files: remove default /etc/config/network, generate it via board.d instead 8 years ago
hotplug.d/net sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
init.d base-files: seed /dev/urandom 8 years ago
iproute2 base-files: add netifd's default prelocal table to /etc/iproute2/rt_tables 8 years ago
rc.button base-files: rework reset button script to indicate factory reset 9 years ago
sysctl.d sysctl: read settings from /etc/sysctl.d/*.conf 9 years ago
uci-defaults base-files: fix group/user settings after sysupgrade 8 years ago
banner Centralize setting of all version info to include/version.mk 8 years ago
banner.failsafe failsafe-mode: print short help on commandline 10 years ago
device_info base-files: add URL option for OEM manufacturer info 9 years ago
diag.sh base-files: make diag.sh stub working in bash 15 years ago
fstab base-files: remove fstab symlink 8 years ago
group base-files: add an ftp group as well 13 years ago
hosts base-files: add /etc/hosts entries for ::1, ff02::1 and ff02::2 9 years ago
inittab image / basefiles: make console password configurable 8 years ago
openwrt_release base-files: properly escape strings for version info 10 years ago
openwrt_version include, base-files, opkg: introduce version configuration to override the embedded version info of generated images - Introduce new Kconfig symbols VERSION_DIST, VERSION_NICK, VERSION_NUMBER and VERSION_REPO to specify distribution, release name, version and repository for a given build - Introduce include/version.mk to provide common helpers for packages dealing with versions - Make opkg use version.mk to populate the opkg.conf template - Make base-files use version.mk to populate /etc/openwrt_version, /etc/openwrt_release and /etc/banner 12 years ago
os-release base-files: Add standard os-release file 8 years ago
passwd base-files: prime root password with "x" to notify programs that there is a shadow record, fix /bin/login.sh password detection accordingly. Solves broken key based dropbear login with empty password after r28935. 13 years ago
preinit base-files: honor CONFIG_TARGET_INIT_PATH 8 years ago
profile base-files: Enhancements to /etc/profile 8 years ago
protocols base-files: add DCCP to /etc/protocols 9 years ago
rc.common base-files: add a init.d option that will start the syscall tracer 9 years ago
rc.local base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts 15 years ago
services Add munin to /etc/services 12 years ago
shadow the root password should be empty for real, like before 10 years ago
shells rename default/ to files/ 18 years ago
sysctl.conf base-files: revert to default ECN settings 9 years ago
sysupgrade.conf base-files: - add sysupgrade support for keepfile hints * introduces /lib/upgrade/keep.d/ for per-package keepfile lists * introduces /etc/sysupgrade.conf for user defined keepfile hints - prime /lib/upgrade/keep.d/base-files-essential to keep sysupgrade usable for images without opkg - change sysupgrade to build the keepfile list from /lib/upgrade/keep.d/, /etc/sysupgrade.conf and opkg list-changed-conffiles 14 years ago