services: openssh: Fix computation of the authorized-key directory.
Fixes a bug introduced in 1f29ed4a81
,
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.
This commit is contained in:
parent
2b8d715da5
commit
0dc63ce519
|
@ -572,10 +572,9 @@ (define (extend-openssh-authorized-keys config keys)
|
||||||
(inherit config)
|
(inherit config)
|
||||||
(authorized-keys
|
(authorized-keys
|
||||||
(match (append (openssh-configuration-authorized-keys config) keys)
|
(match (append (openssh-configuration-authorized-keys config) keys)
|
||||||
(((users _ ...) ...)
|
((and alist ((users _ ...) ...))
|
||||||
;; Build a user/key-list mapping.
|
;; Build a user/key-list mapping.
|
||||||
(let ((user-keys (alist->vhash
|
(let ((user-keys (alist->vhash alist)))
|
||||||
(openssh-configuration-authorized-keys config))))
|
|
||||||
;; Coalesce the key lists associated with each user.
|
;; Coalesce the key lists associated with each user.
|
||||||
(map (lambda (user)
|
(map (lambda (user)
|
||||||
`(,user
|
`(,user
|
||||||
|
|
Loading…
Reference in a new issue