GNU bug report logs - #71064
[PATCH 0/7] Nsncd: Introduce package + nscd service update

Previous Next

Package: guix-patches;

Reported by: picnoir <at> alternativebit.fr

Date: Sun, 19 May 2024 12:42:02 UTC

Severity: normal

Tags: patch

Full log


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

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 71064 <at> debbugs.gnu.org
Cc: picnoir <at> alternativebit.fr, ludo <at> gnu.org,
 Nicolas Graves <ngraves <at> ngraves.fr>
Subject: [PATCH v2 2/2] gnu: services: nscd: Sanitize nscd-configuration's
 implementation.
Date: Sun, 29 Jun 2025 13:52:41 +0200
* gnu/services/base.scm (<nscd-configuration>): Sanitize
nscd-configuration's implementation field with ...
(warn-unexpected-nscd-implementation): New procedure.
---
 gnu/services/base.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index a81bdf809c..0c5b26ccb1 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1363,11 +1363,20 @@ (define-deprecated (mingetty-service config)
 the tty to run, among other things."
   (service mingetty-service-type config))
 
+(define-with-syntax-properties (warn-unexpected-nscd-implementation
+                                (value properties))
+  (unless (member value '(glibc nsncd))
+    (leave (source-properties->location properties)
+           (G_ "The nscd-configuration object's implementation field supports \
+only 'glibc and 'nsncd values.")))
+  value)
+
 (define-record-type* <nscd-configuration> nscd-configuration
   make-nscd-configuration
   nscd-configuration?
   (implementation nscd-implementation
-                  (default 'glibc))               ;'glibc or 'nsncd
+                  (default 'glibc)                ;'glibc or 'nsncd
+                  (sanitize warn-unexpected-nscd-implementation))
   (log-file    nscd-configuration-log-file        ;string
                (default #f))
   (debug-level nscd-debug-level                   ;integer
-- 
2.49.0





This bug report was last modified 23 days ago.

Previous Next


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