GNU bug report logs - #63561
[PATCH 1/2] services: rsync: Use make-inetd-constructor.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 18 May 2023 01:57:01 UTC

Severity: normal

Tags: patch

Merged with 63562

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 63562 <at> debbugs.gnu.org, 63561 <at> debbugs.gnu.org
Subject: [bug#63561] bug#63562: [PATCH 2/2] services: rsync: Use least authority wrapper.
Date: Thu, 18 May 2023 18:58:45 +0200
Hi,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> +                        (make-inetd-constructor
> +                         #$rsync-command
> +                         (cons (endpoint
> +                                (make-socket-address AF_INET INADDR_ANY
> +                                                     #$port-number))
> +                               (if #$ipv6-support?
> +                                   (list
> +                                    (endpoint
> +                                     (make-socket-address AF_INET6 IN6ADDR_ANY
> +                                                          #$port-number)))
> +                                   '()))
> +                         #:user #$user
> +                         #:group #$group)
> +                        (make-forkexec-constructor #$rsync-command

I found it fishy that the same command could be used both in inetd mode
and in “regular” daemon mode.  Turns out that rsync does something…
surprising, as noted in rsync(1):

   If standard input is a socket then rsync will assume that it is being
   run via inetd, otherwise it will detach from the current terminal and
   become a background daemon.

So I guess this is fine, and a welcome change!

Ludo’.




This bug report was last modified 2 years and 60 days ago.

Previous Next


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