[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: services: openssh: Add 'log-level' field.
From: |
Ludovic Courtès |
Subject: |
03/03: services: openssh: Add 'log-level' field. |
Date: |
Tue, 28 Aug 2018 06:35:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 6772ed1e07d6b8ce557199d91aaa1442c77186c7
Author: Ludovic Courtès <address@hidden>
Date: Tue Aug 28 12:33:50 2018 +0200
services: openssh: Add 'log-level' field.
* gnu/services/ssh.scm (<openssh-configuration>)[log-level]: New field.
(openssh-config-file): Honor it.
* doc/guix.texi (Networking Services): Document it.
---
doc/guix.texi | 6 ++++++
gnu/services/ssh.scm | 10 +++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3a3368b..cd0e74a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11782,6 +11782,12 @@ Additional authorized keys can be specified @i{via}
Note that this does @emph{not} interfere with the use of
@file{~/.ssh/authorized_keys}.
+
address@hidden @code{log-level} (default: @code{'info})
+This is a symbol specifying the logging level: @code{quiet}, @code{fatal},
address@hidden, @code{info}, @code{verbose}, @code{debug}, etc. See the man
+page for @file{sshd_config} for the full list of level names.
+
@end table
@end deftp
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index dd96ad6..0566022 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <address@hidden>
;;; Copyright © 2016 David Craven <address@hidden>
;;; Copyright © 2016 Julien Lepiller <address@hidden>
;;; Copyright © 2017 Clément Lassieur <address@hidden>
@@ -319,6 +319,10 @@ The other options should be self-descriptive."
(accepted-environment openssh-configuration-accepted-environment
(default '()))
+ ;; symbol
+ (log-level openssh-configuration-log-level
+ (default 'info))
+
;; list of user-name/file-like tuples
(authorized-keys openssh-authorized-keys
(default '()))
@@ -451,6 +455,10 @@ of user-name/file-like tuples."
(format port "PrintLastLog ~a\n"
#$(if (openssh-configuration-print-last-log? config)
"yes" "no"))
+ (format port "LogLevel ~a\n"
+ #$(string-upcase
+ (symbol->string
+ (openssh-configuration-log-level config))))
;; Add '/etc/authorized_keys.d/%u', which we populate.
(format port "AuthorizedKeysFile \