Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 92001

Summary: urandom boot script doesn't pick up /var/run/random-seed
Product: Gentoo Linux Reporter: Pippin <huntedhacker>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Pippin 2005-05-09 05:36:02 UTC
In baselayout-1.11.11-r3, the arguments to dd are the wrong way round in the start() function. As it stands, it's writing whatever /dev/urandom is set to at boot to /var/run/random-seed at both startup and shutdown.

Fix: change dd if=/dev/urandom of=/var/run/random-seed count=1 &> /dev/null
to dd if=/var/run/random-seed of=/dev/urandom count=1 &> /dev/null
in start().

Reproducible: Always
Steps to Reproduce:
1.
2.
3



Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r6 i686)
=================================================================
System uname: 2.6.11-gentoo-r6 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.11
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  7 2005, 10:09:25)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv
usersandbox"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk
ftp://mirrors.blueyonder.co.uk/mirrors/gentoo
http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/
ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/
http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.heanet.ie/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync3.it.gentoo.org/gentoo-portage"
USE="x86 a52 aac aalib acl acpi alsa apache2 audiofile avi bash-completion
berkdb bitmap-fonts bmp bzip2 caps cdparanoia crypt cscope ctype cups curl
curlwrappers dga directfb divx4linux dlloader dts dv dvb dvd dvdread edl
emacs-w3 encode exif expat fam fbcon ffmpeg fftw flac foomaticdb fortran gd gdbm
gif glut gmp gnutls gstreamer iconv imagemagick imlib ipv6 java jpeg kerberos
ladcca lcms libcaca libg++ libpng libwww live lzo mad matroska mbox memlimit
mikmod mime mmap mmx mng motif mozilla mp3 mpeg ncurses nls nptl offensive ogg
oggvorbis opengl pam pcmcia pcre pdflib png ppds pwdb quicktime readline real
rtc samba sasl sdl sharedmem shorten simplexml sndfile snmp soap sox speex spell
sse ssl svg svga sysfs sysvipc tcpd tga theora tiff truetype truetype-fonts
type1-fonts unicode usb vcd vorbis wifi win32codecs wmf xanim xine xml xml2
xmlrpc xpm xprint xsl xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

Note that baselayout has the ~x86 keyword unmasked, because I wanted dm-crypt
setup at boot time.
Comment 1 Pippin 2005-05-09 08:47:19 UTC
Oops. Re-read the script, and I missed the bit above. Sorry 'bout that.