Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 07:49:44AM -0400, Mouse a écrit : > >> I'm not sure inetd(8) has any business calling realpath in the first > >> place. > > I agree. > > > It has to call realpath(3) since in order to not include several > > times the same file, it makes strings comparaisons about names.

Re: inetd(8): continue or exit on error?

2023-05-29 Thread Taylor R Campbell
> Date: Mon, 29 May 2023 10:11:09 +0200 > From: tlaro...@polynum.com > > The question is what to do in case of a config file not found (this is > the initial problem: the realpath() return status is not tested and a > structure is inconditionnally added to a linked list with an unreachable >

Re: inetd(8): continue or exit on error?

2023-05-29 Thread Mouse
>> I'm not sure inetd(8) has any business calling realpath in the first >> place. I agree. > It has to call realpath(3) since in order to not include several > times the same file, it makes strings comparaisons about names. If I as an admin write a config that tries to include the same file

Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 11:20:32AM +, Taylor R Campbell a écrit : > > Date: Mon, 29 May 2023 10:11:09 +0200 > > From: tlaro...@polynum.com > > > > The question is what to do in case of a config file not found (this is > > the initial problem: the realpath() return status is not tested and a >

Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 11:19:22AM +, Taylor R Campbell a écrit : > > Date: Mon, 29 May 2023 13:13:33 +0200 > > From: tlaro...@polynum.com > > > > I'm for: exit on any error. If we provide a way to check, that's the > > responsability of the administrator to check his config before trying to

Re: inetd(8): continue or exit on error?

2023-05-29 Thread Taylor R Campbell
> Date: Mon, 29 May 2023 13:13:33 +0200 > From: tlaro...@polynum.com > > I'm for: exit on any error. If we provide a way to check, that's the > responsability of the administrator to check his config before trying to > run the thing. Yes please. Should provide an option to check a configuration

Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 11:43:33AM +0100, David Brownlee a écrit : > On Mon, 29 May 2023 at 11:38, Michael van Elst wrote: > > > > tlaro...@polynum.com writes: > > > > >If inetd is not running, if the administrator doesn't look at the logs, > > > > That's why people monitor services and logs and

Re: inetd(8): continue or exit on error?

2023-05-29 Thread David Brownlee
On Mon, 29 May 2023 at 11:38, Michael van Elst wrote: > > tlaro...@polynum.com writes: > > >If inetd is not running, if the administrator doesn't look at the logs, > > That's why people monitor services and logs and use manual or > automated procedures to validate and deploy configuration

Re: inetd(8): continue or exit on error?

2023-05-29 Thread Michael van Elst
tlaro...@polynum.com writes: >If inetd is not running, if the administrator doesn't look at the logs, That's why people monitor services and logs and use manual or automated procedures to validate and deploy configuration changes. >At least, wouldn't it be worth to add a flag simply to parse

Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 11:47:28AM +0200, tlaro...@polynum.com a écrit : > > And some log messages are problematic too: > > DPRINTCONF("Syntax error; Exiting '%s'", CONFIG); > > while it never exits: the function returns an invalid status code, and > the process goes on... For this, I mean

Re: inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
Le Mon, May 29, 2023 at 09:03:07AM -, Michael van Elst a écrit : > tlaro...@polynum.com writes: > > >It seems to me, since these are services, that the failure to load a > >config is critical enough (since the server may be then servicing what > >was not intended to be serviced; the reverse

Re: inetd(8): continue or exit on error?

2023-05-29 Thread Michael van Elst
tlaro...@polynum.com writes: >It seems to me, since these are services, that the failure to load a >config is critical enough (since the server may be then servicing what >was not intended to be serviced; the reverse is less problematic) >to exit at least on this error. inetd will service what

inetd(8): continue or exit on error?

2023-05-29 Thread tlaronde
There are infelicities in /usr/src/usr.sbin/inetd/parse.c and I will send a PR with patches attached. The question is what to do in case of a config file not found (this is the initial problem: the realpath() return status is not tested and a structure is inconditionnally added to a linked list