guix-patches
[Top][All Lists]
Advanced

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

[bug#27855] [PATCH] gnu: Add rsync service.


From: Ludovic Courtès
Subject: [bug#27855] [PATCH] gnu: Add rsync service.
Date: Thu, 31 Aug 2017 15:04:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Christopher Baines <address@hidden> skribis:

> On Fri, 25 Aug 2017 01:40:43 +0300
> Oleg Pykhalov <address@hidden> wrote:
>> I tried to apply all your suggestion, but I really don't know why
>> 'rsync-configuration-user' is ignored (it's always set to "rsyncd").
>> 
>> I use 'pk' to debug this, but still confused.
>
> For comparing strings in Guile, I think its more reliable to use equal?
> rather than eq?, and I think this is the cause of the issues with the
> validation. I don't get validation failures when using (equal? user
> "root").

Right, ‘eq?’ checks for pointer equality, so you shouldn’t use it unless
you really know what you’re doing.

As a rule of thumb, I recommend using type-specific predicates as much
as possible.  So if you’re comparing strings, use ‘string=?’; for
bytevectors, use ‘bytevector=?’; and so on.

This makes the intent clearer, and in a future with type inference and
the like, it will make it easier for the compiler to see whether we’re
doing the right thing.

Ludo’.





reply via email to

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