diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-05-26 16:38:51 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-05-26 16:42:06 +0200 |
commit | 0dc63ce519c5f98b2186d1871176e2fac3a6926b (patch) | |
tree | 256390cd4735bfc4b19f3638db453d17896a344e | |
parent | 2b8d715da510357e9386ceaf15371c99019ce596 (diff) | |
download | guix-0dc63ce519c5f98b2186d1871176e2fac3a6926b.tar.gz |
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 <https://issues.guix.gnu.org/55359>. * gnu/services/ssh.scm (extend-openssh-authorized-keys): Call 'alist->vhash' on the alist resulting from the 'append' call.
-rw-r--r-- | gnu/services/ssh.scm | 5 |
1 files 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 @@ of user-name/file-like tuples." (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 |