diff options
| author | Bruno Victal <mirai@makinata.eu> | 2023-02-25 18:57:58 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2023-03-03 17:55:33 +0100 |
| commit | 0e21015fd2214aade16de35ce5a79bcc192530c7 (patch) | |
| tree | 9033117a4b2bea5f553c7f626c173ae8dd56f60d /gnu/services/ssh.scm | |
| parent | 31b1e229268683826524cb93dd2da8d46dd77343 (diff) | |
services: ssh: Deprecate 'lsh-service' procedure.
* doc/guix.texi (Networking Services): Remove mention of lsh-service.
Document lsh-service-type and lsh-service-configuration.
* gnu/services/ssh.scm (<lsh-configuration>): Set default values based
on the now deprecated 'lsh-service' procedure.
(lsh-service-type): Set default value.
(lsh-service): Deprecate procedure.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services/ssh.scm')
| -rw-r--r-- | gnu/services/ssh.scm | 68 |
1 files changed, 42 insertions, 26 deletions
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 7b038e6ac67..3baa55731df 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | #:use-module (ice-9 vlist) | 42 | #:use-module (ice-9 vlist) |
| 43 | #:export (lsh-configuration | 43 | #:export (lsh-configuration |
| 44 | lsh-configuration? | 44 | lsh-configuration? |
| 45 | lsh-service | 45 | lsh-service ; deprecated |
| 46 | lsh-service-type | 46 | lsh-service-type |
| 47 | 47 | ||
| 48 | openssh-configuration | 48 | openssh-configuration |
| @@ -74,20 +74,34 @@ | |||
| 74 | lsh-configuration? | 74 | lsh-configuration? |
| 75 | (lsh lsh-configuration-lsh | 75 | (lsh lsh-configuration-lsh |
| 76 | (default lsh)) | 76 | (default lsh)) |
| 77 | (daemonic? lsh-configuration-daemonic?) | 77 | (daemonic? lsh-configuration-daemonic? |
| 78 | (host-key lsh-configuration-host-key) | 78 | (default #t)) |
| 79 | (interfaces lsh-configuration-interfaces) | 79 | (host-key lsh-configuration-host-key |
| 80 | (port-number lsh-configuration-port-number) | 80 | (default "/etc/lsh/host-key")) |
| 81 | (allow-empty-passwords? lsh-configuration-allow-empty-passwords?) | 81 | (interfaces lsh-configuration-interfaces |
| 82 | (root-login? lsh-configuration-root-login?) | 82 | (default '())) |
| 83 | (syslog-output? lsh-configuration-syslog-output?) | 83 | (port-number lsh-configuration-port-number |
| 84 | (pid-file? lsh-configuration-pid-file?) | 84 | (default 22)) |
| 85 | (pid-file lsh-configuration-pid-file) | 85 | (allow-empty-passwords? lsh-configuration-allow-empty-passwords? |
| 86 | (x11-forwarding? lsh-configuration-x11-forwarding?) | 86 | (default #f)) |
| 87 | (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding?) | 87 | (root-login? lsh-configuration-root-login? |
| 88 | (password-authentication? lsh-configuration-password-authentication?) | 88 | (default #f)) |
| 89 | (public-key-authentication? lsh-configuration-public-key-authentication?) | 89 | (syslog-output? lsh-configuration-syslog-output? |
| 90 | (initialize? lsh-configuration-initialize?)) | 90 | (default #t)) |
| 91 | (pid-file? lsh-configuration-pid-file? | ||
| 92 | (default #f)) | ||
| 93 | (pid-file lsh-configuration-pid-file | ||
| 94 | (default "/var/run/lshd.pid")) | ||
| 95 | (x11-forwarding? lsh-configuration-x11-forwarding? | ||
| 96 | (default #t)) | ||
| 97 | (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding? | ||
| 98 | (default #t)) | ||
| 99 | (password-authentication? lsh-configuration-password-authentication? | ||
| 100 | (default #t)) | ||
| 101 | (public-key-authentication? lsh-configuration-public-key-authentication? | ||
| 102 | (default #t)) | ||
| 103 | (initialize? lsh-configuration-initialize? | ||
| 104 | (default #t))) | ||
| 91 | 105 | ||
| 92 | (define %yarrow-seed | 106 | (define %yarrow-seed |
| 93 | "/var/spool/lsh/yarrow-seed-file") | 107 | "/var/spool/lsh/yarrow-seed-file") |
| @@ -203,19 +217,20 @@ | |||
| 203 | (lsh-configuration-allow-empty-passwords? config)))) | 217 | (lsh-configuration-allow-empty-passwords? config)))) |
| 204 | 218 | ||
| 205 | (define lsh-service-type | 219 | (define lsh-service-type |
| 206 | (service-type (name 'lsh) | 220 | (service-type |
| 207 | (description | 221 | (name 'lsh) |
| 208 | "Run the GNU@tie{}lsh secure shell (SSH) daemon, | 222 | (extensions |
| 223 | (list (service-extension shepherd-root-service-type | ||
| 224 | lsh-shepherd-service) | ||
| 225 | (service-extension pam-root-service-type | ||
| 226 | lsh-pam-services) | ||
| 227 | (service-extension activation-service-type | ||
| 228 | lsh-activation))) | ||
| 229 | (description "Run the GNU@tie{}lsh secure shell (SSH) daemon, | ||
| 209 | @command{lshd}.") | 230 | @command{lshd}.") |
| 210 | (extensions | 231 | (default-value (lsh-configuration)))) |
| 211 | (list (service-extension shepherd-root-service-type | ||
| 212 | lsh-shepherd-service) | ||
| 213 | (service-extension pam-root-service-type | ||
| 214 | lsh-pam-services) | ||
| 215 | (service-extension activation-service-type | ||
| 216 | lsh-activation))))) | ||
| 217 | 232 | ||
| 218 | (define* (lsh-service #:key | 233 | (define-deprecated (lsh-service #:key |
| 219 | (lsh lsh) | 234 | (lsh lsh) |
| 220 | (daemonic? #t) | 235 | (daemonic? #t) |
| 221 | (host-key "/etc/lsh/host-key") | 236 | (host-key "/etc/lsh/host-key") |
| @@ -231,6 +246,7 @@ | |||
| 231 | (password-authentication? #t) | 246 | (password-authentication? #t) |
| 232 | (public-key-authentication? #t) | 247 | (public-key-authentication? #t) |
| 233 | (initialize? #t)) | 248 | (initialize? #t)) |
| 249 | lsh-service-type | ||
| 234 | "Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. | 250 | "Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. |
| 235 | @var{host-key} must designate a file containing the host key, and readable | 251 | @var{host-key} must designate a file containing the host key, and readable |
| 236 | only by root. | 252 | only by root. |
