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 82383a8c7c2..d97c300d18a 100644
--- a/gnu/machine/digital-ocean.scm
+++ b/gnu/machine/digital-ocean.scm
@@ -1,5 +1,6 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org> 2;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
3;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
3;;; 4;;;
4;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
5;;; 6;;;
@@ -256,7 +257,7 @@ cat > /etc/bootstrap-config.scm << EOF
256 (service openssh-service-type 257 (service openssh-service-type
257 (openssh-configuration 258 (openssh-configuration
258 (log-level 'debug) 259 (log-level 'debug)
259 (permit-root-login 'without-password)))) 260 (permit-root-login 'prohibit-password))))
260 %base-services))) 261 %base-services)))
261EOF 262EOF
262# guix pull 263# guix pull
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 1891db04876..a018052eeba 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -6,6 +6,8 @@
6;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> 6;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
7;;; Copyright © 2020 pinoaffe <pinoaffe@airmail.cc> 7;;; Copyright © 2020 pinoaffe <pinoaffe@airmail.cc>
8;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> 8;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
9;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
10;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
9;;; 11;;;
10;;; This file is part of GNU Guix. 12;;; This file is part of GNU Guix.
11;;; 13;;;
@@ -30,6 +32,7 @@
30 #:use-module (gnu services web) 32 #:use-module (gnu services web)
31 #:use-module (gnu system pam) 33 #:use-module (gnu system pam)
32 #:use-module (gnu system shadow) 34 #:use-module (gnu system shadow)
35 #:use-module (guix deprecation)
33 #:use-module (guix gexp) 36 #:use-module (guix gexp)
34 #:use-module (guix records) 37 #:use-module (guix records)
35 #:use-module (guix modules) 38 #:use-module (guix modules)
@@ -288,7 +291,7 @@ The other options should be self-descriptive."
288 ;; integer 291 ;; integer
289 (port-number openssh-configuration-port-number 292 (port-number openssh-configuration-port-number
290 (default 22)) 293 (default 22))
291 ;; Boolean | 'without-password 294 ;; Boolean | 'prohibit-password
292 (permit-root-login openssh-configuration-permit-root-login 295 (permit-root-login openssh-configuration-permit-root-login
293 (default #f)) 296 (default #f))
294 ;; Boolean 297 ;; Boolean
@@ -441,7 +444,11 @@ of user-name/file-like tuples."
441 #$(match (openssh-configuration-permit-root-login config) 444 #$(match (openssh-configuration-permit-root-login config)
442 (#t "yes") 445 (#t "yes")
443 (#f "no") 446 (#f "no")
444 ('without-password "without-password"))) 447 ('without-password (warn-about-deprecation
448 'without-password #f
449 #:replacement 'prohibit-password)
450 "prohibit-password")
451 ('prohibit-password "prohibit-password")))
445 (format port "PermitEmptyPasswords ~a\n" 452 (format port "PermitEmptyPasswords ~a\n"
446 #$(if (openssh-configuration-allow-empty-passwords? config) 453 #$(if (openssh-configuration-allow-empty-passwords? config)
447 "yes" "no")) 454 "yes" "no"))
diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm
index ff853a71499..19c26b86dd1 100644
--- a/gnu/tests/ganeti.scm
+++ b/gnu/tests/ganeti.scm
@@ -1,5 +1,6 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Marius Bakke <marius@gnu.org>. 2;;; Copyright © 2020 Marius Bakke <marius@gnu.org>.
3;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
3;;; 4;;;
4;;; This file is part of GNU Guix. 5;;; This file is part of GNU Guix.
5;;; 6;;;
@@ -65,7 +66,7 @@
65 66
66 (service openssh-service-type 67 (service openssh-service-type
67 (openssh-configuration 68 (openssh-configuration
68 (permit-root-login 'without-password))) 69 (permit-root-login 'prohibit-password)))
69 70
70 (service ganeti-service-type 71 (service ganeti-service-type
71 (ganeti-configuration 72 (ganeti-configuration