unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Brown <brown@fastmail.com>
To: 32264@debbugs.gnu.org
Subject: [bug#32264] openssh forwarding options
Date: Tue, 24 Jul 2018 17:54:32 -0500	[thread overview]
Message-ID: <878t60tfbr.fsf@fastmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

Please find attached a patch that enables the configuration of some of
openssh's forwarding options.

These changes are based off of the existing x11-forwarding? option that
already exists in ssh.scm.

Also, I have added some documentation for these options.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-services-Add-forwarding-options-to-openssh.patch --]
[-- Type: text/x-patch, Size: 2871 bytes --]

From f2c0c2387b2dcc4ce092c31a5a024565e4adbb50 Mon Sep 17 00:00:00 2001
From: Eric Brown <brown@fastmail.com>
Date: Tue, 24 Jul 2018 16:19:40 -0500
Subject: [PATCH] gnu: services: Add forwarding options to openssh.

* gnu/services/ssh.scm (openssh): Add forwarding options to openssh.
---
 doc/guix.texi        |  9 +++++++++
 gnu/services/ssh.scm | 22 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 84347d156..0341ea29f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11634,6 +11634,15 @@ When true, forwarding of X11 graphical client connections is
 enabled---in other words, @command{ssh} options @option{-X} and
 @option{-Y} will work.
 
+@item @code{allow-agent-forwarding?} (default: @code{#t})
+Whether to allow agent forwarding.
+
+@item @code{allow-tcp-forwarding?} (default: @code{#t})
+Whether to allow TCP forwarding.
+
+@item @code{gateway-ports?} (default: @code{#f})
+Whether to allow gateway ports.
+
 @item @code{challenge-response-authentication?} (default: @code{#f})
 Specifies whether challenge response authentication is allowed (e.g. via
 PAM).
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index f158fdf01..dd96ad6ae 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -289,6 +289,19 @@ The other options should be self-descriptive."
   ;; Boolean
   (x11-forwarding?       openssh-configuration-x11-forwarding?
                          (default #f))
+
+  ;; Boolean
+  (allow-agent-forwarding? openssh-configuration-allow-agent-forwarding?
+                           (default #t))
+
+  ;; Boolean
+  (allow-tcp-forwarding? openssh-configuration-allow-tcp-forwarding?
+                         (default #t))
+
+  ;; Boolean
+  (gateway-ports? openssh-configuration-gateway-ports?
+                         (default #f))
+
   ;; Boolean
   (challenge-response-authentication? openssh-challenge-response-authentication?
                                       (default #f))
@@ -418,6 +431,15 @@ of user-name/file-like tuples."
            (format port "X11Forwarding ~a\n"
                    #$(if (openssh-configuration-x11-forwarding? config)
                          "yes" "no"))
+           (format port "AllowAgentForwarding ~a\n"
+                   #$(if (openssh-configuration-allow-agent-forwarding? config)
+                         "yes" "no"))
+           (format port "AllowTcpForwarding ~a\n"
+                   #$(if (openssh-configuration-allow-tcp-forwarding? config)
+                         "yes" "no"))
+           (format port "GatewayPorts ~a\n"
+                   #$(if (openssh-configuration-gateway-ports? config)
+                         "yes" "no"))
            (format port "PidFile ~a\n"
                    #$(openssh-configuration-pid-file config))
            (format port "ChallengeResponseAuthentication ~a\n"
-- 
2.18.0


             reply	other threads:[~2018-07-24 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 22:54 Eric Brown [this message]
2018-07-29 14:05 ` bug#32264: openssh forwarding options Ludovic Courtès

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=878t60tfbr.fsf@fastmail.com \
    --to=brown@fastmail.com \
    --cc=32264@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).