From: Brice Waegeneire <brice@waegenei.re>
To: 49129@debbugs.gnu.org
Subject: [bug#49129] [PATCH v2] services: openssh: Replace 'without-password' by 'prohibit-password'.
Date: Sun, 20 Jun 2021 15:15:55 +0200 [thread overview]
Message-ID: <20210620131555.7961-1-brice@waegenei.re> (raw)
In-Reply-To: <87v968lti2.fsf@nckx>
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'.
* gnu/tests/ganeti.scm (%ganeti-os): Replace 'without-password' by
'prohibit-password'.
---
I added a depreciation warning but without the fancy colors as I wasn't able
to use the common macros.
doc/guix.texi | 6 +++---
gnu/machine/digital-ocean.scm | 3 ++-
gnu/services/ssh.scm | 10 ++++++++--
gnu/tests/ganeti.scm | 3 ++-
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index efeb176e3d..66c6adc4f5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -17070,7 +17070,7 @@ shell daemon, @command{sshd}. Its value must be an
(service openssh-service-type
(openssh-configuration
(x11-forwarding? #t)
- (permit-root-login 'without-password)
+ (permit-root-login 'prohibit-password)
(authorized-keys
`(("alice" ,(local-file "alice.pub"))
("bob" ,(local-file "bob.pub"))))))
@@ -17104,7 +17104,7 @@ TCP port on which @command{sshd} listens for incoming connections.
@item @code{permit-root-login} (default: @code{#f})
This field determines whether and when to allow logins as root. If
@code{#f}, root logins are disallowed; if @code{#t}, they are allowed.
-If it's the symbol @code{'without-password}, then root logins are
+If it's the symbol @code{'prohibit-password}, then root logins are
permitted but not with password-based authentication.
@item @code{allow-empty-passwords?} (default: @code{#f})
@@ -29333,7 +29333,7 @@ cluster node that supports multiple storage backends, and installs the
;; Ganeti uses SSH to communicate between nodes.
(service openssh-service-type
(openssh-configuration
- (permit-root-login 'without-password)))
+ (permit-root-login 'prohibit-password)))
(service ganeti-service-type
(ganeti-configuration
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..be97c1322f 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -6,6 +6,7 @@
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -288,7 +289,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 +442,12 @@ of user-name/file-like tuples."
#$(match (openssh-configuration-permit-root-login config)
(#t "yes")
(#f "no")
- ('without-password "without-password")))
+ ('without-password
+ (format (current-error-port) "warning: Option \
+'without-password for openssh-configuration-permit-root-login field is \
+deprecated. Please use 'prohibit-password instead.\n")
+ "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
--
2.31.1
next prev parent reply other threads:[~2021-06-20 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-20 10:13 [bug#49129] [PATCH] services: openssh: Replace 'without-password' by 'prohibit-password' Brice Waegeneire
2021-06-20 10:28 ` Tobias Geerinckx-Rice via Guix-patches via
2021-06-20 13:15 ` Brice Waegeneire [this message]
2021-06-20 14:51 ` bug#49129: [PATCH v2] " Tobias Geerinckx-Rice via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210620131555.7961-1-brice@waegenei.re \
--to=brice@waegenei.re \
--cc=49129@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).