Changeset fedf8f4 in freewrt


Ignore:
Timestamp:
Jul 22, 2006, 4:58:57 PM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
fa281a9
Parents:
a7b530b
Message:

as an instant-measure against bad quality of random numbers on
these devices, add a few bytes of entropy from the build system
on the image

after discussion with wbx@ who taught be that flash writes are
not cheap I refrained from ever automatically updating this file
(e.g. via cronjob and on shutdown), so if you want persistent
entropy, you'd do the following command manually on the box:
# dd if=/dev/urandom of=/etc/.rnd bs=512 count=1

once we have our fuse/nvram thingie, entropy ought to be stored
there, and if a new image is flashed, the old and new entropy
ought to be merged. i'll tend to this when js@ is done.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@357 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
package/base-files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • package/base-files/Makefile

    ra7b530b rfedf8f4  
    33include $(TOPDIR)/rules.mk
    44
    5 PKG_NAME:=base-files
    6 PKG_RELEASE:=6
     5PKG_NAME:=              base-files
     6PKG_RELEASE:=           7
    77WRKSRC=                 ${WRKDIR}/base-files
    88
     
    7070            echo $(BR2_RUNTIME_SSHKEY) >$(IDIR_BASE)/etc/dropbear/authorized_keys; \
    7171        )
     72        rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \
     73            dd if=$$rng of=$(IDIR_BASE)/etc/.rnd bs=512 count=1; \
     74            chmod 600 $(IDIR_BASE)/etc/.rnd
    7275        mkdir -p $(IDIR_BASE)/dev
    7376        mkdir -p $(IDIR_BASE)/etc/crontabs
  • package/base-files/default/etc/preinit

    ra7b530b rfedf8f4  
    22export PATH=/bin:/sbin:/usr/bin:/usr/sbin
    33mount none /proc -t proc
     4cat /etc/.rnd >/dev/urandom 2>&1
    45failsafe_if=eth0
    56[ -f /etc/preinit.arch ] && . /etc/preinit.arch
Note: See TracChangeset for help on using the changeset viewer.