guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#54352] [PATCH v2] services: dnsmasq: Add more options.


From: Maxime Devos
Subject: [bug#54352] [PATCH v2] services: dnsmasq: Add more options.
Date: Sun, 20 Mar 2022 13:30:57 +0100
User-agent: Evolution 3.38.3-1

Remco van 't Veer schreef op zo 20-03-2022 om 13:22 [+0100]:
> 2022/03/20 12:56, Maxime Devos:
> 
> > It would be nice to verify that these are, in fact, booleans,
> > using field sanitizers.  See, e.g., ensure-setuid-program-list
> > in (gnu system).
> 
> I agree but the same could be said about the other fields and types in
> this record, and those of other services. 

In the long-term, it would be nice to eventually add error checking to
other services and fields as well.  In the short-term, I would avoid
making error handling worse.

> In this case, the names of the fields ending with "?" should be
> enough for somebody to realise this is a boolean, IMHO. 
> The";boolean" comments I've added are just me trying to blend in.

It's technically sufficient, but it does not make for nice error
messages, see the thread at
<https://lists.gnu.org/archive/html/guix-devel/2022-02/msg00140.html>.

In this particular case, there won't be an error message *at all*,
due to how (if forward-private-reverse-lookup? ... ...) works.

For example, consider the case where someone new to Guile and Guix sees
‘boolean’ in the documentation and then tries using "true" and "false"
(the strings):

  (dnsmasq-configuration
    (forward-private-reverse-lookup? "false"))

Currently, this will silently do the wrong thing.

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]