[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/10: services: urandom-seed: Become a dependency of 'user-processes'.
From: |
Ludovic Courtès |
Subject: |
03/10: services: urandom-seed: Become a dependency of 'user-processes'. |
Date: |
Fri, 22 Dec 2017 04:04:11 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 4e9fd50857a917ea30106262e356838c4f45b6ba
Author: Ludovic Courtès <address@hidden>
Date: Wed Dec 20 11:09:03 2017 +0100
services: urandom-seed: Become a dependency of 'user-processes'.
This ensures that 'urandom-seed' is started before programs that rely on
sources of randomness.
Fixes <https://bugs.gnu.org/29773>.
Reported by Leo Famulari <address@hidden>.
* gnu/services/base.scm (urandom-seed-shepherd-service): Change
'requirement' to (file-systems).
(urandom-seed-service-type): Extend USER-PROCESSES-SERVICE-TYPE.
---
gnu/services/base.scm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 85c442b..2652571 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -529,7 +529,7 @@ in KNOWN-MOUNT-POINTS when it is stopped."
(list (shepherd-service
(documentation "Preserve entropy across reboots for /dev/urandom.")
(provision '(urandom-seed))
- (requirement '(user-processes))
+ (requirement '(file-systems))
(start #~(lambda _
;; On boot, write random seed into /dev/urandom.
(when (file-exists? #$%random-seed-file)
@@ -590,7 +590,13 @@ in KNOWN-MOUNT-POINTS when it is stopped."
(service-type (name 'urandom-seed)
(extensions
(list (service-extension shepherd-root-service-type
- urandom-seed-shepherd-service)))
+ urandom-seed-shepherd-service)
+
+ ;; Have 'user-processes' depend on 'urandom-seed'.
+ ;; This ensures that user processes and daemons don't
+ ;; start until we have seeded the PRNG.
+ (service-extension user-processes-service-type
+ (const '(urandom-seed)))))
(description
"Seed the @file{/dev/urandom} pseudo-random number
generator (RNG) with the value recorded when the system was last shut
- branch master updated (a468f89 -> d633f2f), Ludovic Courtès, 2017/12/22
- 03/10: services: urandom-seed: Become a dependency of 'user-processes'.,
Ludovic Courtès <=
- 06/10: gnu: Add python-activepapers., Ludovic Courtès, 2017/12/22
- 08/10: mapped-devices: 'luks-device-mapping' checks its source device., Ludovic Courtès, 2017/12/22
- 02/10: services: 'user-processes-service-type' can now be extended., Ludovic Courtès, 2017/12/22
- 04/10: services: urandom-seed: Deprecate the 'urandom-seed-service' procedure., Ludovic Courtès, 2017/12/22
- 10/10: gnu: mutter: Add xorg-xserver-xwayland input., Ludovic Courtès, 2017/12/22
- 07/10: mapped-devices: Add 'location' and 'check' fields., Ludovic Courtès, 2017/12/22
- 09/10: guix system: Check mapped devices upon 'init' and 'reconfigure'., Ludovic Courtès, 2017/12/22
- 01/10: doc: Document fixed-output derivations., Ludovic Courtès, 2017/12/22
- 05/10: services: urandom-seed: Depend on udev., Ludovic Courtès, 2017/12/22