[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: services: knot: Fix configuration verification.
From: |
guix-commits |
Subject: |
branch master updated: services: knot: Fix configuration verification. |
Date: |
Wed, 10 Feb 2021 22:15:06 -0500 |
This is an automated email from the git hooks/post-receive script.
iyzsong pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 408f0b4 services: knot: Fix configuration verification.
408f0b4 is described below
commit 408f0b4c4dba671b648fe99cd4ef77d26e4486a4
Author: Alexey Abramov <levenson@mmer.org>
AuthorDate: Sat Jan 30 09:19:32 2021 +0100
services: knot: Fix configuration verification.
* gnu/services/dns.scm (verify-knot-key-configuration): Fix the
order of memq arguments.
(verify-knot-keystore-configuration): Likewise.
(verify-knot-acl-configuration): Replace fold with every procedure.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
gnu/services/dns.scm | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gnu/services/dns.scm b/gnu/services/dns.scm
index b339eb0..d4aefe6 100644
--- a/gnu/services/dns.scm
+++ b/gnu/services/dns.scm
@@ -256,9 +256,9 @@
(let ((id (knot-key-configuration-id key)))
(unless (and (string? id) (not (equal? id "")))
(error-out "key id must be a non empty string.")))
- (unless (memq '(#f hmac-md5 hmac-sha1 hmac-sha224 hmac-sha256 hmac-sha384
hmac-sha512)
- (knot-key-configuration-algorithm key))
- (error-out "algorithm must be one of: #f, 'hmac-md5, 'hmac-sha1,
+ (unless (memq (knot-key-configuration-algorithm key)
+ '(#f hmac-md5 hmac-sha1 hmac-sha224 hmac-sha256 hmac-sha384
hmac-sha512))
+ (error-out "algorithm must be one of: #f, 'hmac-md5, 'hmac-sha1,
'hmac-sha224, 'hmac-sha256, 'hmac-sha384 or 'hmac-sha512")))
(define (verify-knot-keystore-configuration keystore)
@@ -267,9 +267,9 @@
(let ((id (knot-keystore-configuration-id keystore)))
(unless (and (string? id) (not (equal? id "")))
(error-out "keystore id must be a non empty string.")))
- (unless (memq '(pem pkcs11)
- (knot-keystore-configuration-backend keystore))
- (error-out "backend must be one of: 'pem or 'pkcs11")))
+ (unless (memq (knot-keystore-configuration-backend keystore)
+ '(pem pkcs11))
+ (error-out "backend must be one of: 'pem or 'pkcs11")))
(define (verify-knot-policy-configuration policy)
(unless (knot-policy-configuration? policy)
@@ -288,7 +288,7 @@
(unless (and (string? id) (not (equal? id "")))
(error-out "acl id must be a non empty string."))
(unless (and (list? address)
- (fold (lambda (x1 x2) (and (string? x1) (string? x2))) ""
address))
+ (every string? address))
(error-out "acl address must be a list of strings.")))
(unless (boolean? (knot-acl-configuration-deny? acl))
(error-out "deny? must be #t or #f.")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: services: knot: Fix configuration verification.,
guix-commits <=