From 13fb6e2fc352e0e8de28a9995c71cdf329821660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 10 Oct 2015 02:33:44 +0200 Subject: [PATCH] sysvinit: load random seed from dom0 provided data QubesOS/qubes-issues#1311 --- vm-init.d/qubes-core | 4 ++++ vm-init.d/qubes-core-appvm | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/vm-init.d/qubes-core b/vm-init.d/qubes-core index 5ea8d0f..08cf189 100755 --- a/vm-init.d/qubes-core +++ b/vm-init.d/qubes-core @@ -20,6 +20,10 @@ start() chgrp qubes /var/run/qubes chmod 0775 /var/run/qubes + # Load random seed from dom0 + qubesdb-read /qubes-random-seed | base64 -d > /dev/urandom + qubesdb-rm /qubes-random-seed + # Location of files which contains list of protected files PROTECTED_FILE_LIST='/etc/qubes/protected-files.d' diff --git a/vm-init.d/qubes-core-appvm b/vm-init.d/qubes-core-appvm index c1696de..933e8dd 100755 --- a/vm-init.d/qubes-core-appvm +++ b/vm-init.d/qubes-core-appvm @@ -64,6 +64,11 @@ start() # the service will start only after successful restore systemctl start qubes-db.service echo Back to life. + + # Reload random seed + qubesdb-read /qubes-random-seed | base64 -d > /dev/urandom + qubesdb-rm /qubes-random-seed + fi start_meminfo_writer=$(/usr/bin/qubesdb-read /qubes-service/meminfo-writer 2>/dev/null)