GNU bug report logs - #46185
[PATCH] services: knot: Fix an acl and a key verification.

Previous Next

Package: guix-patches;

Reported by: Alexey Abramov <levenson <at> mmer.org>

Date: Sat, 30 Jan 2021 08:20:01 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> outlook.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46185 in the body.
You can then email your comments to 46185 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46185; Package guix-patches. (Sat, 30 Jan 2021 08:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexey Abramov <levenson <at> mmer.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 30 Jan 2021 08:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alexey Abramov <levenson <at> mmer.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: knot: Fix an acl and a key verification.
Date: Sat, 30 Jan 2021 09:19:32 +0100
* gnu/services/dns.scm (verify-knot-key-configuration): Change the order of memq attributes.
(verify-knot-keystore-configuration): Likewise.
(verify-knot-acl-configuration): Replace fold with every procedure.
---
 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 b339eb0619..d4aefe6285 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.")))
-- 
2.30.0





Reply sent to 宋文武 <iyzsong <at> outlook.com>:
You have taken responsibility. (Thu, 11 Feb 2021 03:17:02 GMT) Full text and rfc822 format available.

Notification sent to Alexey Abramov <levenson <at> mmer.org>:
bug acknowledged by developer. (Thu, 11 Feb 2021 03:17:02 GMT) Full text and rfc822 format available.

Message #10 received at 46185-done <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> outlook.com>
To: Alexey Abramov <levenson <at> mmer.org>
Cc: 46185-done <at> debbugs.gnu.org
Subject: Re: [bug#46185] [PATCH] services: knot: Fix an acl and a key
 verification.
Date: Thu, 11 Feb 2021 11:17:55 +0800
Alexey Abramov <levenson <at> mmer.org> writes:

> * gnu/services/dns.scm (verify-knot-key-configuration): Change the
> order of memq attributes.
> (verify-knot-keystore-configuration): Likewise.
> (verify-knot-acl-configuration): Replace fold with every procedure.
> ---
>  gnu/services/dns.scm | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>

I adjust the commit message a bit and pushed, thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 Mar 2021 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.