[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] [PATCH] inetd: Listen on connections for tcpmux serv
From: |
Mats Erik Andersson |
Subject: |
Re: [bug-inetutils] [PATCH] inetd: Listen on connections for tcpmux services |
Date: |
Sat, 13 Nov 2010 11:30:26 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
this patch was partially erroneous. A reverting patch is included.
måndag den 6 september 2010 klockan 11:20 skrev Guillem Jover detta:
> * src/inetd.c (nextconfig): Call expand_enter instead of enter for
> tcpmux services.
> (fix_tcpmux): Likewise.
> ---
> src/inetd.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/src/inetd.c b/src/inetd.c
> index 354ae1d..1c51a51 100644
> --- a/src/inetd.c
> +++ b/src/inetd.c
> @@ -1161,10 +1161,8 @@ nextconfig (const char *file)
> {
> sep->se_fd = -1;
> sep->se_checked = 1;
> - enter (sep);
> }
> - else
> - expand_enter (sep);
> + expand_enter (sep);
> freeconfig (sep);
> }
> endconfig (fconfig);
Since expand_enter() uses getaddrinfo(3) in resolving the service
name, every effort to start any TCPMUX service will fail immediately.
The original coding is correct. Sorry to say, but no testing to actually
start a custom TCPMUX service, using this alteration, could ever have
been performed. It would have been sufficent to try
tcpmux stream tcp nowait root internal
tcpmux/honeybee stream tcp nowait nobody /bin/date date
and
$ echo "honeybee" | nc localhost 1
> @@ -1249,7 +1247,7 @@ fix_tcpmux (void)
> if (debug)
> fprintf (stderr, "inserting default tcpmux entry\n");
> syslog (LOG_INFO, "inserting default tcpmux entry");
> - enter (&serv);
> + expand_enter (&serv);
> }
> }
>
This change is correct, however, since
$ getent services tcpmux
is a correct call.
Best regards,
Mats E A
0001-inetd-Distinguish-enter-and-expand_enter.patch
Description: Text Data
signature.asc
Description: Digital signature
- Re: [bug-inetutils] [PATCH] inetd: Listen on connections for tcpmux services,
Mats Erik Andersson <=