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 /gnu/services | |
| parent | 2b8d715da510357e9386ceaf15371c99019ce596 (diff) | |
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.
Diffstat (limited to 'gnu/services')
| -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 95646ac033e..aa024599a10 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm | |||
| @@ -572,10 +572,9 @@ of user-name/file-like tuples." | |||
| 572 | (inherit config) | 572 | (inherit config) |
| 573 | (authorized-keys | 573 | (authorized-keys |
| 574 | (match (append (openssh-configuration-authorized-keys config) keys) | 574 | (match (append (openssh-configuration-authorized-keys config) keys) |
| 575 | (((users _ ...) ...) | 575 | ((and alist ((users _ ...) ...)) |
| 576 | ;; Build a user/key-list mapping. | 576 | ;; Build a user/key-list mapping. |
| 577 | (let ((user-keys (alist->vhash | 577 | (let ((user-keys (alist->vhash alist))) |
| 578 | (openssh-configuration-authorized-keys config)))) | ||
| 579 | ;; Coalesce the key lists associated with each user. | 578 | ;; Coalesce the key lists associated with each user. |
| 580 | (map (lambda (user) | 579 | (map (lambda (user) |
| 581 | `(,user | 580 | `(,user |
