[rhel7-branch 1/1] livemedia-creator: Remove random-seed from images (#1258986)

bcl installerbot-noreply at redhat.com
Tue Sep 1 16:45:46 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

systemd uses /var/lib/systemd/random-seed to add entropy to /dev/urandom
at boot time. During image creation this file is created, and if not
removed everything using the image will be adding the same seed.

This is only additional entropy, NOT a seed in the sense of a starting
point for a PRNG, so it will be mixed with other entropy as the system
runs. It isn't a good idea to use the same value everywhere so make sure
it is removed in %post

Resolves: rhbz#1258986
---
 docs/fedora-minimized.ks | 3 +++
 docs/rhel7-livemedia.ks  | 2 ++
 docs/rhel7-minimal.ks    | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/docs/fedora-minimized.ks b/docs/fedora-minimized.ks
index ac97017..985f82e 100644
--- a/docs/fedora-minimized.ks
+++ b/docs/fedora-minimized.ks
@@ -37,6 +37,9 @@ part swap --size=1000
 %post
 # Remove root password
 passwd -d root > /dev/null
+
+# Remove random-seed
+rm /var/lib/systemd/random-seed
 %end
 
 %packages
diff --git a/docs/rhel7-livemedia.ks b/docs/rhel7-livemedia.ks
index fb1a75b..0403c3d 100644
--- a/docs/rhel7-livemedia.ks
+++ b/docs/rhel7-livemedia.ks
@@ -308,6 +308,8 @@ rm -f /core*
 rm -f /.readahead_collect
 touch /var/lib/readahead/early.sorted
 
+# Remove random-seed
+rm /var/lib/systemd/random-seed
 %end
 
 %post --nochroot
diff --git a/docs/rhel7-minimal.ks b/docs/rhel7-minimal.ks
index 9c41c1b..e954586 100644
--- a/docs/rhel7-minimal.ks
+++ b/docs/rhel7-minimal.ks
@@ -38,6 +38,9 @@ part swap --size=1000
 %post
 # Remove root password
 passwd -d root > /dev/null
+
+# Remove random-seed
+rm /var/lib/systemd/random-seed
 %end
 
 %packages


-- 
To view this commit on github, visit https://github.com/rhinstaller/lorax/commit/adc2fb7ad9337b26ae27ffa51ecb87cc849bb5f6


More information about the anaconda-patches mailing list