From 0e21015fd2214aade16de35ce5a79bcc192530c7 Mon Sep 17 00:00:00 2001 From: Bruno Victal Date: Sat, 25 Feb 2023 18:57:58 +0000 Subject: services: ssh: Deprecate 'lsh-service' procedure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi (Networking Services): Remove mention of lsh-service. Document lsh-service-type and lsh-service-configuration. * gnu/services/ssh.scm (): 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 --- gnu/services/ssh.scm | 68 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 26 deletions(-) (limited to 'gnu/services/ssh.scm') diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm index 7b038e6ac6..3baa55731d 100644 --- a/gnu/services/ssh.scm +++ b/gnu/services/ssh.scm @@ -42,7 +42,7 @@ #:use-module (ice-9 vlist) #:export (lsh-configuration lsh-configuration? - lsh-service + lsh-service ; deprecated lsh-service-type openssh-configuration @@ -74,20 +74,34 @@ lsh-configuration? (lsh lsh-configuration-lsh (default lsh)) - (daemonic? lsh-configuration-daemonic?) - (host-key lsh-configuration-host-key) - (interfaces lsh-configuration-interfaces) - (port-number lsh-configuration-port-number) - (allow-empty-passwords? lsh-configuration-allow-empty-passwords?) - (root-login? lsh-configuration-root-login?) - (syslog-output? lsh-configuration-syslog-output?) - (pid-file? lsh-configuration-pid-file?) - (pid-file lsh-configuration-pid-file) - (x11-forwarding? lsh-configuration-x11-forwarding?) - (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding?) - (password-authentication? lsh-configuration-password-authentication?) - (public-key-authentication? lsh-configuration-public-key-authentication?) - (initialize? lsh-configuration-initialize?)) + (daemonic? lsh-configuration-daemonic? + (default #t)) + (host-key lsh-configuration-host-key + (default "/etc/lsh/host-key")) + (interfaces lsh-configuration-interfaces + (default '())) + (port-number lsh-configuration-port-number + (default 22)) + (allow-empty-passwords? lsh-configuration-allow-empty-passwords? + (default #f)) + (root-login? lsh-configuration-root-login? + (default #f)) + (syslog-output? lsh-configuration-syslog-output? + (default #t)) + (pid-file? lsh-configuration-pid-file? + (default #f)) + (pid-file lsh-configuration-pid-file + (default "/var/run/lshd.pid")) + (x11-forwarding? lsh-configuration-x11-forwarding? + (default #t)) + (tcp/ip-forwarding? lsh-configuration-tcp/ip-forwarding? + (default #t)) + (password-authentication? lsh-configuration-password-authentication? + (default #t)) + (public-key-authentication? lsh-configuration-public-key-authentication? + (default #t)) + (initialize? lsh-configuration-initialize? + (default #t))) (define %yarrow-seed "/var/spool/lsh/yarrow-seed-file") @@ -203,19 +217,20 @@ (lsh-configuration-allow-empty-passwords? config)))) (define lsh-service-type - (service-type (name 'lsh) - (description - "Run the GNU@tie{}lsh secure shell (SSH) daemon, + (service-type + (name 'lsh) + (extensions + (list (service-extension shepherd-root-service-type + lsh-shepherd-service) + (service-extension pam-root-service-type + lsh-pam-services) + (service-extension activation-service-type + lsh-activation))) + (description "Run the GNU@tie{}lsh secure shell (SSH) daemon, @command{lshd}.") - (extensions - (list (service-extension shepherd-root-service-type - lsh-shepherd-service) - (service-extension pam-root-service-type - lsh-pam-services) - (service-extension activation-service-type - lsh-activation))))) + (default-value (lsh-configuration)))) -(define* (lsh-service #:key +(define-deprecated (lsh-service #:key (lsh lsh) (daemonic? #t) (host-key "/etc/lsh/host-key") @@ -231,6 +246,7 @@ (password-authentication? #t) (public-key-authentication? #t) (initialize? #t)) + lsh-service-type "Run the @command{lshd} program from @var{lsh} to listen on port @var{port-number}. @var{host-key} must designate a file containing the host key, and readable only by root. -- cgit v1.2.3