Re: [CODE] inetd FINAL

2023-07-03 Thread tlaronde
Le Mon, Jul 03, 2023 at 08:23:13PM +0100, David Brownlee a écrit : > Some random thoughts :) > > - Would it make sense to actively reject -l or similar when -c is given I don't think so. They can be a "slip of the thumb" when passing switches and they do no harm---the problem is that the checking

Re: Trivial program size inflation

2023-07-03 Thread Steffen Nurpmeso
Robert Elz wrote in <2939.1688393...@jacaranda.noi.kre.to>: |Date:Sun, 2 Jul 2023 15:51:06 -0400 (EDT) |From:Mouse |Message-ID: <202307021951.paa07...@stone.rodents-montreal.org> | || For example, a program that calls printf but never uses any || floating-point

Re: [CODE] inetd FINAL

2023-07-03 Thread David Brownlee
Some random thoughts :) - Would it make sense to actively reject -l or similar when -c is given - Resilient mode would probably benefit from a new {sub ,}section heading in the man page - I'd be inclined to reject a config which tries to embed a null with \000 or similar with an error David

[CODE] inetd FINAL

2023-07-03 Thread tlaronde
Here is the final code with all implemented: http://downloads.kergis.com/misc/inetd.tar.gz The new version: $ ls -l ./inetd -rwxr-xr-x 1 alceste wheel 76136 Jul 3 19:55 ./inetd $ size ./inetd textdata bss dec hex filename 563073008 11016 70331 112bb ./inetd v

Re: Trivial program size inflation

2023-07-03 Thread Robert Elz
Date:Mon, 3 Jul 2023 15:21:24 + From:Taylor R Campbell Message-ID: <20230703152125.8798060...@jupiter.mumble.net> | Not sure why calling malloc or realloc still causes jemalloc.o to be | pulled in, in the presence of -lbsdmalloc. libbsdmalloc doesn't appear

Re: Trivial program size inflation

2023-07-03 Thread Taylor R Campbell
> Date: Mon, 3 Jul 2023 07:45:27 + (UTC) > From: RVP > > On Mon, 3 Jul 2023, RVP wrote: > > > Somebody should maybe add calloc() to bsdmalloc. > > And posix_memalign() (any others?) too, else you end up with 2 > different arenas and free()/realloc() operating on the wrong one. The attached

Re: Trivial program size inflation

2023-07-03 Thread Robert Elz
Date:Sun, 2 Jul 2023 15:51:06 -0400 (EDT) From:Mouse Message-ID: <202307021951.paa07...@stone.rodents-montreal.org> | For example, a program that calls printf but never uses any | floating-point values at all will not, in theory, need floating point | support.

Re: inetd(8): security considerations

2023-07-03 Thread Mouse
> [...], putting the file only under root writability is a safety > precaution too (against one's own blunders). > There are pros and cons either way---meaning that, you are right, it > has to be configurable; remains the question of: what should be the > default? Strict or not? Hmm. For NetBSD

Re: inetd(8): security considerations

2023-07-03 Thread tlaronde
Le Mon, Jul 03, 2023 at 08:36:23AM -0400, Mouse a écrit : > > There is one more thing I'd be inclined to add: when _serving_ a > > config as root[*], error if the configuration (including sourced > > chunks) is writable by someone else than root. > > > What do you think? > > A reasonable thing if

Re: printf(1), sh(1), POSIX.2 and octal escape sequences

2023-07-03 Thread tlaronde
Le Mon, Jul 03, 2023 at 01:36:54PM +0200, ??? a écrit : > On Mon, Jul 03, 2023 at 06:13:45AM +, David Holland wrote: > > On Fri, Jun 30, 2023 at 05:51:13PM +0200, tlaro...@polynum.com wrote: > > > For this one I will go with the established behavior, but what should I > > > do when someone is

Re: inetd(8): security considerations

2023-07-03 Thread Mouse
> There is one more thing I'd be inclined to add: when _serving_ a > config as root[*], error if the configuration (including sourced > chunks) is writable by someone else than root. > What do you think? A reasonable thing if it's an overridable default. An extremely annoying thing (albeit only

Re: printf(1), sh(1), POSIX.2 and octal escape sequences

2023-07-03 Thread наб
On Mon, Jul 03, 2023 at 06:13:45AM +, David Holland wrote: > On Fri, Jun 30, 2023 at 05:51:13PM +0200, tlaro...@polynum.com wrote: > > For this one I will go with the established behavior, but what should I > > do when someone is passing, in octal or in hexa: "\000" ou "\x00"? > If you don't

Re: Trivial program size inflation

2023-07-03 Thread Martin Husemann
On Sun, Jul 02, 2023 at 10:53:31PM +, Emmanuel Dreyfus wrote: > On Sun, Jul 02, 2023 at 11:16:12PM +0200, Joerg Sonnenberger wrote: > > > At least in 9.3, dlopen() in a static binary does not work. Try using > > > a NSS module from a statically lunked binary to check that. > > > > It does wor

inetd(8): security considerations

2023-07-03 Thread tlaronde
I'm almost finished with inetd(8)---I still wait for an answer about ATF tests: to be added if my version of inetd will reach the NetBSD src tree; if not reaching the NetBSD src tree, I will not bother with ATF. There is one more thing I'd be inclined to add: when _serving_ a config as root[*], er

Re: Trivial program size inflation

2023-07-03 Thread RVP
On Mon, 3 Jul 2023, RVP wrote: Somebody should maybe add calloc() to bsdmalloc. And posix_memalign() (any others?) too, else you end up with 2 different arenas and free()/realloc() operating on the wrong one. -RVP