mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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 <leo@famulari.name>. * gnu/services/base.scm (urandom-seed-shepherd-service): Change 'requirement' to (file-systems). (urandom-seed-service-type): Extend USER-PROCESSES-SERVICE-TYPE.
This commit is contained in:
parent
206a28d84a
commit
4e9fd50857
1 changed files with 8 additions and 2 deletions
|
@ -529,7 +529,7 @@ (define (urandom-seed-shepherd-service _)
|
|||
(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 @@ (define urandom-seed-service-type
|
|||
(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
|
||||
|
|
Loading…
Reference in a new issue