summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBrice Waegeneire <brice@waegenei.re>2021-06-20 15:15:55 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-06-20 16:44:08 +0200
commitef3f38ea0027f48feb6a29df131ac58bfbb46b7d (patch)
tree07d2cc7cd3f0e2115cf92f477ec0d8e0c6b3999b /gnu
parenta211078f992bc5a26eaf787c6b01caa41de67597 (diff)
services: openssh: Replace 'without-password' by 'prohibit-password'.
For some time, OpenSSH's option 'PermitRootLogin' has deprecated the ambiguous argument 'without-password' with 'prohibit-password'. * doc/guix.texi (Network Services): Replace 'without-password by 'prohibit-password. * gnu/machine/digital-ocean.scm (guix-infect): Change system configuration to use 'prohibit-password. * gnu/services/ssh.scm (openssh-configuration): Change comment to use 'prohibit-password. (openssh-config-file): Add support for 'prohibit-password to 'permit-root-login'. Warn about deprecated 'without-password usage. * gnu/tests/ganeti.scm (%ganeti-os): Replace 'without-password by 'prohibit-password. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/machine/digital-ocean.scm3
-rw-r--r--gnu/services/ssh.scm11
-rw-r--r--gnu/tests/ganeti.scm3
3 files changed, 13 insertions, 4 deletions
diff --git a/gnu/machine/digital-ocean.scm b/gnu/machine/digital-ocean.scm
index 82383a8c7c..d97c300d18 100644
--- a/gnu/machine/digital-ocean.scm
+++ b/gnu/machine/digital-ocean.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -256,7 +257,7 @@ cat > /etc/bootstrap-config.scm << EOF
(service openssh-service-type
(openssh-configuration
(log-level 'debug)
- (permit-root-login 'without-password))))
+ (permit-root-login 'prohibit-password))))
%base-services)))
EOF
# guix pull
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 1891db0487..a018052eeb 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -6,6 +6,8 @@
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 pinoaffe <pinoaffe@airmail.cc>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,6 +32,7 @@
#:use-module (gnu services web)
#:use-module (gnu system pam)
#:use-module (gnu system shadow)
+ #:use-module (guix deprecation)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (guix modules)
@@ -288,7 +291,7 @@ The other options should be self-descriptive."
;; integer
(port-number openssh-configuration-port-number
(default 22))
- ;; Boolean | 'without-password
+ ;; Boolean | 'prohibit-password
(permit-root-login openssh-configuration-permit-root-login
(default #f))
;; Boolean
@@ -441,7 +444,11 @@ of user-name/file-like tuples."
#$(match (openssh-configuration-permit-root-login config)
(#t "yes")
(#f "no")
- ('without-password "without-password")))
+ ('without-password (warn-about-deprecation
+ 'without-password #f
+ #:replacement 'prohibit-password)
+ "prohibit-password")
+ ('prohibit-password "prohibit-password")))
(format port "PermitEmptyPasswords ~a\n"
#$(if (openssh-configuration-allow-empty-passwords? config)
"yes" "no"))
diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index ff853a7149..19c26b86dd 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Marius Bakke <marius@gnu.org>.
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -65,7 +66,7 @@
(service openssh-service-type
(openssh-configuration
- (permit-root-login 'without-password)))
+ (permit-root-login 'prohibit-password)))
(service ganeti-service-type
(ganeti-configuration