[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: services: Fix fail2ban configuration seriali
From: |
guix-commits |
Subject: |
branch master updated: gnu: services: Fix fail2ban configuration serialization. |
Date: |
Tue, 10 Jan 2023 10:59:56 -0500 |
This is an automated email from the git hooks/post-receive script.
apteryx pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new dc403ec7f1 gnu: services: Fix fail2ban configuration serialization.
dc403ec7f1 is described below
commit dc403ec7f15cdb94a43654a941b25894cff707c7
Author: muradm <mail@muradm.net>
AuthorDate: Tue Jan 10 17:47:56 2023 +0300
gnu: services: Fix fail2ban configuration serialization.
This fixes a regression from 543d971ed2a1d9eb934af1f51930741d7cc4e7ef
whereby
match-lambda due to configuration field reordering.
* gnu/services/security.scm:
[serialize-fail2ban-ignore-cache-configuration]: Switch to match-record.
[serialize-fail2ban-jail-filter-configuration]: Switch to match-record.
[serialize-fail2ban-jail-action-configuration]: Switch to match-record.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/services/security.scm | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/gnu/services/security.scm b/gnu/services/security.scm
index 50111455fb..8116072920 100644
--- a/gnu/services/security.scm
+++ b/gnu/services/security.scm
@@ -42,11 +42,11 @@
(max-count integer "Cache size.")
(max-time integer "Cache time."))
-(define serialize-fail2ban-ignore-cache-configuration
- (match-lambda
- (($ <fail2ban-ignore-cache-configuration> _ key max-count max-time)
- (format #f "key=\"~a\", max-count=~d, max-time=~d"
- key max-count max-time))))
+(define (serialize-fail2ban-ignore-cache-configuration config)
+ (match-record config <fail2ban-ignore-cache-configuration>
+ (key max-count max-time)
+ (format #f "key=\"~a\", max-count=~d, max-time=~d"
+ key max-count max-time)))
(define-maybe/no-serialization string)
@@ -54,10 +54,10 @@
(name string "Filter to use.")
(mode maybe-string "Mode for filter."))
-(define serialize-fail2ban-jail-filter-configuration
- (match-lambda
- (($ <fail2ban-jail-filter-configuration> _ name mode)
- (format #f "~a~@[[mode=~a]~]" name (maybe-value mode)))))
+(define (serialize-fail2ban-jail-filter-configuration config)
+ (match-record config <fail2ban-jail-filter-configuration>
+ (name mode)
+ (format #f "~a~@[[mode=~a]~]" name (maybe-value mode))))
(define (argument? a)
(and (pair? a)
@@ -86,17 +86,17 @@
(format #f "~a=~a" (car e) (any-value (cdr e))))))
(format #f "~a" (string-join (map key-value args) ","))))
-(define serialize-fail2ban-jail-action-configuration
- (match-lambda
- (($ <fail2ban-jail-action-configuration> _ name arguments)
- (format
- #f "~a~a"
- name
- (if (null? arguments) ""
- (format
- #f "[~a]"
- (serialize-fail2ban-jail-action-configuration-arguments
- arguments)))))))
+(define (serialize-fail2ban-jail-action-configuration config)
+ (match-record config <fail2ban-jail-action-configuration>
+ (name arguments)
+ (format
+ #f "~a~a"
+ name
+ (if (null? arguments) ""
+ (format
+ #f "[~a]"
+ (serialize-fail2ban-jail-action-configuration-arguments
+ arguments))))))
(define fail2ban-backend->string
(match-lambda
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: services: Fix fail2ban configuration serialization.,
guix-commits <=