diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-09-29 09:35:35 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-09-29 21:56:27 +0200 |
commit | f9090015c58e6f47be74fe6116ef10a90378a899 (patch) | |
tree | 651fbf958e4918c49ac216875ed1ba7487a8b752 /gnu/build/secret-service.scm | |
parent | 4d047853da76dc5fa5dd50ecb750c861342ef47b (diff) | |
download | guix-f9090015c58e6f47be74fe6116ef10a90378a899.tar.gz |
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'.
Diffstat (limited to 'gnu/build/secret-service.scm')
-rw-r--r-- | gnu/build/secret-service.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/build/secret-service.scm b/gnu/build/secret-service.scm index 40c24abf09..6697e6e1b0 100644 --- a/gnu/build/secret-service.scm +++ b/gnu/build/secret-service.scm @@ -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) |