me
/
guix
Archived
1
0
Fork 0

secret-service: Fix file port leak in 'secret-service-send-secrets'.

* gnu/build/secret-service.scm (secret-service-send-secrets): Use
'call-with-input-file' instead of 'open-input-file'.
master
Ludovic Courtès 2020-09-29 09:35:35 +02:00
parent 4d047853da
commit f9090015c5
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 2 deletions

View File

@ -69,8 +69,10 @@ local PORT. If connect fails, sleep 1s and retry RETRY times."
(version 0)
(files ,files-sizes-modes))))
(write secrets sock)
(for-each (compose (cute dump-port <> sock)
(cute open-input-file <>))
(for-each (lambda (file)
(call-with-input-file file
(lambda (input)
(dump-port input sock))))
files))))
(define (secret-service-receive-secrets port)