From 0dc63ce519c5f98b2186d1871176e2fac3a6926b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 26 May 2022 16:38:51 +0200 Subject: [PATCH] services: openssh: Fix computation of the authorized-key directory. Fixes a bug introduced in 1f29ed4a812f86c45e2d9c37fd9f80f6d0418293, whereby 'authorized-key-directory' would end up creating empty files for authorized keys passed as an extension. See . * gnu/services/ssh.scm (extend-openssh-authorized-keys): Call 'alist->vhash' on the alist resulting from the 'append' call. --- gnu/services/ssh.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 95646ac033..aa024599a1 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -572,10 +572,9 @@ (define (extend-openssh-authorized-keys config keys) (inherit config) (authorized-keys (match (append (openssh-configuration-authorized-keys config) keys) - (((users _ ...) ...) + ((and alist ((users _ ...) ...)) ;; Build a user/key-list mapping. - (let ((user-keys (alist->vhash - (openssh-configuration-authorized-keys config)))) + (let ((user-keys (alist->vhash alist))) ;; Coalesce the key lists associated with each user. (map (lambda (user) `(,user