summary refs log tree commit diff
path: root/gnu/services/ssh.scm
diff options
context:
space:
mode:
authorMartin Castillo <castilma@uni-bremen.de>2018-03-15 23:40:58 +0100
committerLudovic Courtès <ludo@gnu.org>2018-03-18 00:02:05 +0100
commit985934cb218eaa44b255cfc464b11ce05f691973 (patch)
tree40372bef4d767d1605d8f3c694e6154b5d1bc8f0 /gnu/services/ssh.scm
parent3c274149688472cca4f506483b82d0b7865481b3 (diff)
downloadguix-985934cb218eaa44b255cfc464b11ce05f691973.tar.gz
services: openssh: Add 'accepted-environment' field.
* gnu/services/ssh.scm (<openssh-configuration>)[accepted-environment]: New field.
(openssh-config-file): Honor 'acccepted-environment'.
* doc/guix.texi (Networking Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services/ssh.scm')
-rw-r--r--gnu/services/ssh.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 301ba74041..f1d2be3f6b 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -302,6 +302,10 @@ The other options should be self-descriptive."
   (subsystems            openssh-configuration-subsystems
                          (default '(("sftp" "internal-sftp"))))
 
+  ;; list of strings
+  (accepted-environment  openssh-configuration-accepted-environment
+                         (default '()))
+
   ;; list of user-name/file-like tuples
   (authorized-keys       openssh-authorized-keys
                          (default '()))
@@ -430,6 +434,9 @@ of user-name/file-like tuples."
            (format port "AuthorizedKeysFile \
  .ssh/authorized_keys .ssh/authorized_keys2 /etc/ssh/authorized_keys.d/%u\n")
 
+           (for-each (lambda (s) (format port "AcceptEnv ~a\n" s))
+                     '#$(openssh-configuration-accepted-environment config))
+
            (for-each
             (match-lambda
               ((name command) (format port "Subsystem\t~a\t~a\n" name command)))