Re: interactive shell detection in shrc

2025-02-17 Thread Steffen Nurpmeso
Hello. Coming back to an old thread from September 2024, about shell word aka field splitting ... RVP wrote in <66f9553f-7e86-97e5-2669-f3b7d7177...@sdf.org>: |On Fri, 27 Sep 2024, Steffen Nurpmeso wrote: | |> Yes i am afraid of shell field splitting and expansion, and i d

Re: crontab(1) using stdin

2024-10-30 Thread Steffen Nurpmeso
наб wrote in : |On Thu, Oct 31, 2024 at 12:35:01AM +0100, Steffen Nurpmeso wrote: |> наб wrote in |>\ |> .xyz>: |>|You can still write this portably: |>| echo crontab > ./- |>| crontab - < - |>| rm - |>|unideal, sure, but. |> OpenIndiana say

Re: crontab(1) using stdin

2024-10-30 Thread Steffen Nurpmeso
наб wrote in : |On Wed, Oct 30, 2024 at 06:29:57PM +0100, Edgar Fuß wrote: |>> If NetBSD "crontab" errors with |>> "use crontab - to replace your crontab from the standard input stream" |>> then that's an improvement over both the standard and the status quo IMO |> While I agree that what PO

Re: interactive shell detection in shrc

2024-10-09 Thread Steffen Nurpmeso
Robert Elz wrote in <1895.1728442...@jacaranda.noi.kre.to>: |Date:Fri, 4 Oct 2024 07:53:59 -0700 |From:George Georgalis |Message-ID: | ||> test -t 0 ||> ||> is reliable. | |It is, for what it is suppposed to do. ... |and in the script if you do "test -t 0

Re: interactive shell detection in shrc

2024-09-30 Thread Steffen Nurpmeso
RVP wrote in : |On Mon, 30 Sep 2024, tlaro...@kergis.com wrote: |> But, if I'm not mistaken, the discussion was about testing if a shell |> is interactive, that is, "inheriting" whatever has been set and |> testing it. Since SHELL is not set by all login programs (your |> example of xterm) an

Re: interactive shell detection in shrc

2024-09-27 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240927224352.XbfXbbOA@steffen%sdaoden.eu>: |Robert Elz wrote in | <10279.1727476...@jacaranda.noi.kre.to>: | ... ||| I guess to be entirely POSIX compatible my test should include: ||| ||| tty >/dev/null 2>&1 && tty <&1 &g

Re: interactive shell detection in shrc

2024-09-27 Thread Steffen Nurpmeso
Robert Elz wrote in <10279.1727476...@jacaranda.noi.kre.to>: ... || I guess to be entirely POSIX compatible my test should include: || || tty >/dev/null 2>&1 && tty <&1 >/dev/null 2>&1 && | |The second of those would need to be testing (the pre-redirected) |stderr, not stdout, interactive

Re: interactive shell detection in shrc

2024-09-27 Thread Steffen Nurpmeso
Greg A. Woods wrote in : |At Fri, 27 Sep 2024 07:14:46 +0700, Robert Elz wrote: |Subject: Re: interactive shell detection in shrc ... |Reading POSIX Issue 7 sh(1) just now I note the following text: | | If the -i option is present, or if there are no operands and the | shell's standard inp

Re: interactive shell detection in shrc

2024-09-26 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240926233234.MwKivWJi@steffen%sdaoden.eu>: |Greg A. Woods wrote in | : ||At Tue, 24 Sep 2024 00:56:40 +0200, Steffen Nurpmeso \ ... ||To work around this I do the following: || || _interactive=false || case "$-" in || *i*) || _

Re: interactive shell detection in shrc

2024-09-26 Thread Steffen Nurpmeso
Hello. Greg A. Woods wrote in : |At Tue, 24 Sep 2024 00:56:40 +0200, Steffen Nurpmeso \ |wrote: |Subject: Re: interactive shell detection in shrc |> |> case ${-} in |> *i*|*m*) # {{{ |> ... |> esac | |I'm very curious: why did you

Re: Fwd: Re: interactive shell detection in shrc

2024-09-25 Thread Steffen Nurpmeso
Robert Elz wrote in <6599.1727248...@jacaranda.noi.kre.to>: |Date:Tue, 24 Sep 2024 23:54:13 + (UTC) |From:RVP |Message-ID: <4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org> | || On Tue, 24 Sep 2024, Steffen Nurpmeso wrote: | |I replied to St

Re: Fwd: Re: interactive shell detection in shrc

2024-09-25 Thread Steffen Nurpmeso
RVP wrote in <4d7cdca7-fcf4-8985-7c1d-79ef63125...@sdf.org>: |On Tue, 24 Sep 2024, Steffen Nurpmeso wrote: |> Robert Elz wrote in |> <7132.1727161...@jacaranda.noi.kre.to>: |>|Date:Tue, 24 Sep 2024 00:56:40 +0200 |> [...] |>| if $___SHRC |> |&g

Fwd: Re: interactive shell detection in shrc

2024-09-24 Thread Steffen Nurpmeso
--- Forwarded from Steffen Nurpmeso --- Date: Tue, 24 Sep 2024 22:26:34 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Robert Elz Cc: Valery Ushakov Subject: Re: interactive shell detection in shrc Message-ID: <20240924202634.-Z-0KGXP@steffen%sdaoden.eu> Robert Elz wr

Re: interactive shell detection in shrc

2024-09-24 Thread Steffen Nurpmeso
Robert Elz wrote in <23334.1727160...@jacaranda.noi.kre.to>: |Date:Tue, 24 Sep 2024 03:06:49 +0300 |From:Valery Ushakov |Message-ID: | || I also wanted to drop the ${1+"$@"} workaroud for the v7 shell bug || which I'm pretty sure we are not going to hit in this

Re: interactive shell detection in shrc

2024-09-23 Thread Steffen Nurpmeso
Valery Ushakov wrote in : |On Tue, Sep 24, 2024 at 00:06:22 +0700, Robert Elz wrote: | |> Date:Mon, 23 Sep 2024 12:16:10 +0300 |> From:Valery Ushakov |> Message-ID: |> |>| I'd like to switch this to the "early return" style, something like |>| |>| # the res

Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Mouse wrote in <202407122106.raa17...@stone.rodents-montreal.org>: |>>> I note the specification does not forbid the handling of lines |>>> longer than LINE_MAX characters. |>> No, it certainly does not do that. | |Yeah; like a lot of examples, recovery from error cases is allowed to |be "ha

Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240712172239.8n2tqdo2@steffen%sdaoden.eu>: |Robert Elz wrote in | <28937.1720777...@jacaranda.noi.kre.to>: ||Date:Fri, 12 Jul 2024 08:15:57 + ||From:Emmanuel Dreyfus ||Message-ID: || ||| I note the specificat

Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Robert Elz wrote in <28937.1720777...@jacaranda.noi.kre.to>: |Date:Fri, 12 Jul 2024 08:15:57 + |From:Emmanuel Dreyfus |Message-ID: | || I note the specification does not forbid the || handling of lines longer than LINE_MAX characters. | |No, it certainly

Re: submission port usage (was: /etc/services losses)

2023-08-04 Thread Steffen Nurpmeso
Edgar Fuß wrote in : |I think the de-facto rationale for a larger network goes like this: |-- You don't want to get your IPs blacklisted because infected clients | send spam from within your network. |-- Other sites will allow mail submission on their submission port only | after authen

Re: /etc/services losses

2023-08-03 Thread Steffen Nurpmeso
Mouse wrote in <202308031802.oaa16...@stone.rodents-montreal.org>: |> Hm, but especially :25 was traditionally used by MUAs, no? |> Who used the submission port ~a decade ago? | |User agents. I'm pretty sure submission was a thing _two_ decades ago, |though IIRC not all that big a thing. (M

Re: /etc/services losses

2023-08-03 Thread Steffen Nurpmeso
Greg Troxel wrote in : |Taylor R Campbell writes: | |> `smtp(s)' and `submission(s)' are subtly different protocols and |> should not be aliases: |> |> - smtp(s) is for MTA<->MTA exchange of fully formed internet mail |> messages with complete headers. Hm, but especially :25 was traditi

Re: /etc/services losses

2023-08-03 Thread Steffen Nurpmeso
Greg Troxel wrote in : |Hauke Fath writes: |> On Mon, 31 Jul 2023 18:20:40 +0200, Steffen Nurpmeso wrote: |>> Greg Troxel wrote in : |>>|Hauke Fath writes: |>>|> attached is a diff with services that for some reason or other got |>>|> dropped from /et

Re: /etc/services losses

2023-07-31 Thread Steffen Nurpmeso
Greg Troxel wrote in : |Hauke Fath writes: |> attached is a diff with services that for some reason or other got |> dropped from /etc/services - in particular Amanda* and AppleTalk. | |The really big question here is the relationship between our |/etc/services and | | https://www.iana.o

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: Proposed chown(8)/chgrp(1) enhancement

2023-04-29 Thread Steffen Nurpmeso
Paul Goyette wrote in : ... | ( p->fts_statp->st_mode && 07000 ) == 0)) ^^ --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert

Re: Controlling Daemons (inetd or aunchd or relaunchd?)

2023-02-27 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20230226013826.renhc%stef...@sdaoden.eu>: |Bruno Melo wrote in | : ... |I personally use something scripted that polls periodically |instead (for most). It is pretty easy (most of the time), like ... |I personally think UNIX should be as easy as the

Re: Controlling Daemons (inetd or aunchd or relaunchd?)

2023-02-25 Thread Steffen Nurpmeso
Bruno Melo wrote in : |> I am Qingyao Sun, a student looking forward to participating in a GSoC |> project for NetBSD this year. One project I am interested in is "Port |> launchd" http://wiki.netbsd.org/projects/project/launchd-port/. I have |> reached out to Christos Zoulas, the prospective

Re: mail(1) editline defaults to vi mode?

2023-02-18 Thread Steffen Nurpmeso
Robert Elz wrote in <1017.1676698...@jacaranda.noi.kre.to>: |Date:Sat, 18 Feb 2023 05:18:22 +0300 |From:Valery Ushakov |Message-ID: | || I think no program should ever init editline to vi mode, | |This is BSD, everything should default to vi mode!!! | |If yo

Re: strftime(3) oddities with %s, %z

2022-11-02 Thread Steffen Nurpmeso
Mouse wrote in <202211021508.laa26...@stone.rodents-montreal.org>: |> Suppose you create a struct tm _without_ gmtime(3) or localtime(3), |> using designated initializers or memset for zero-initialization, with |> only what is included in POSIX: | |> struct tm tm = { |> .tm_sec = 56, |> .

Re: Permissions of the root dot files

2022-08-30 Thread Steffen Nurpmeso
Robert Elz wrote in <15785.1661861...@jacaranda.noi.kre.to>: ... |I have no idea... like I said, the owner bits (except x) for |a root owned file are almost meaningless. "Yeah". ... --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and

Re: Permissions of the root dot files

2022-08-30 Thread Steffen Nurpmeso
Valery Ushakov wrote in : |On Tue, Aug 30, 2022 at 08:38:02 +0700, Robert Elz wrote: | |> Date:Tue, 30 Aug 2022 02:27:33 +0300 |> From:Valery Ushakov |> Message-ID: |> |>| Is there any particular reason why /root/.profile and /root/.cshrc |>| (that have hard

Re: sh(1) and ksh(1) default PATH

2022-08-15 Thread Steffen Nurpmeso
Robert Elz wrote in <8853.1660590...@jacaranda.noi.kre.to>: |Date:Mon, 15 Aug 2022 10:45:59 -0400 |From:Jan Schaumann |Message-ID: <20220815144559.go11...@netmeister.org> | || I think it's short-sighted and unfair to equate lack || of experience with idiocy. |

Re: sh(1) and ksh(1) default PATH

2022-08-15 Thread Steffen Nurpmeso
Hauke Fath wrote in <20220815111506408018.2367a...@espresso.rhein-neckar.de>: |On Sun, 14 Aug 2022 09:04:21 + (UTC), RVP wrote: |> Linux has a pam_env.so which reads /etc/environment and |> /etc/environment.d/* for this kind of thing. I was looking |> for something like that on NetBSD a wh

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Mouse wrote in <202111292115.qaa06...@stone.rodents-montreal.org>: |> * The maximum is 65000. | |It probably is actually 65535, or 65495, or some such; if there is a |limit that is actually 65000, it strikes me as unlikely to be anything |but someone imposing an artificial round-human

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Joerg Sonnenberger wrote in : |On Mon, Nov 29, 2021 at 06:31:30PM +0100, Steffen Nurpmeso wrote: |> Joerg Sonnenberger wrote in |> : |>|On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: |>|> DNS queries (via UDP) are limited to max 512, as that is what the |>

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Joerg Sonnenberger wrote in : |On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: |> DNS queries (via UDP) are limited to max 512, as that is what the |> protocol always required, so can be handled by everything (or should be). | |Strictly speaking, it is the minimum MTU every IPv4 i

Re: stack overflow in getaddrinfo(3) with a small-sized stack in pthreads

2021-11-29 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20211129173130.b55ba%stef...@sdaoden.eu>: |Joerg Sonnenberger wrote in | : ||On Mon, Nov 29, 2021 at 08:38:35PM +0700, Robert Elz wrote: ||> DNS queries (via UDP) are limited to max 512, as that is what the ||> protocol always required, so can b

Re: Possible "new" redirect style for /bin/sh (needs a name)

2021-04-10 Thread Steffen Nurpmeso
Greg A. Woods wrote in : |At Sun, 11 Apr 2021 01:37:44 +0700, Robert Elz wrote: |Subject: Re: Possible "new" redirect style for /bin/sh (needs a name) ... |Perhaps the current high FD watermark could even be exposed to the user |with a new shell variable such as ${CUR_MAX_FD}, but also/inste

Re: Summary of man-page formatting

2020-11-16 Thread Steffen Nurpmeso
Kamil Rytarowski wrote in <12f29556-2407-2f6f-de5c-67539bca6...@netbsd.org>: |I apologize for nerves and words that could be avoided. | |I'm going to summarize the situation with formatters in the NetBSD base. | |1. NetBSD base ships with two programs that can format manual pages from |base

Re: Proposal to remove catman(8)

2020-11-10 Thread Steffen Nurpmeso
Jaromír Doleček wrote in : |Le mar. 10 nov. 2020 à 23:45, Mouse a écrit : |> And, of course, when you're up single-user is, generally, when you're |> least able to bring other tools to bear or the like, and when you're |> possibly most likely need to know how to use a command you don't use |

Re: Moving telnet/telnetd from base to pkgsrc

2018-12-14 Thread Steffen Nurpmeso
Greg Troxel wrote in : |Robert Elz writes: | |> It does no harm as it is, if you don't use the client, all it does is |> occupy a couple of hundred blocks (nothing), the server is not |> enabled by default, and it is even smaller. | |I agree. I use it often, to see if TCP ports are open an

Re: Future shell work - comments reqyuested

2017-07-14 Thread Steffen Nurpmeso
Robert Elz wrote: || I think the standard says IN and ERR rather than IN and OUT for || this condition?! | |It does, but we implement the latter (always have I think) - not sure |whether that should be changed or not, or what the effects might be. Yes, it does. If possible it should be chan

Re: Future shell work - comments reqyuested

2017-07-13 Thread Steffen Nurpmeso
Robert Elz wrote: |I have more or less finished work on shell arithmetic, completing the |currently missing (not posix required, but allowed) operators, that is |the unary ++, -- (prefix & postfix) and the ',' operator. There's |nothing much to say (or ask) about that, but... A pretty impres

Re: Restricting rdtsc [was: kernel aslr]

2017-03-31 Thread Steffen Nurpmeso
Maxime Villard wrote: |Having read several papers on the exploitation of cache latency to defeat |aslr (kernel or not), it appears that disabling the rdtsc instruction is a |good mitigation on x86. However, some applications can legitimately use it, |so I would rather suggest restricting it to

Re: Environment settings not taken into account by (portable) bmake(1)?(!)

2016-11-05 Thread Steffen Nurpmeso
Taylor R Campbell wrote: | Date: Sat, 05 Nov 2016 18:47:54 +0100 | From: Steffen Nurpmeso | | I am currently fixing the build system of the MUA i maintain | because the portable version of bmake looses CFLAGS (and LDFLAGS | i think) from the environment. | |Can you share a

Environment settings not taken into account by (portable) bmake(1)?(!)

2016-11-05 Thread Steffen Nurpmeso
Hello. I am currently fixing the build system of the MUA i maintain because the portable version of bmake looses CFLAGS (and LDFLAGS i think) from the environment. I currently have no NetBSD (my main machine died last year, my used one is small and resource-restricted), but unlikely that this bug

Re: pthread library related

2016-05-31 Thread Steffen Nurpmeso
Joerg Sonnenberger wrote: |On Mon, May 30, 2016 at 02:19:26PM -0700, Charles Cui wrote: |> good to know atomic_inc_uint_nv is implemented using cas. | |No, atomic_inc is *not* necessarily implemented using CAS. There are a What a pity. |couple of different ways to do it ranging from implici

Re: pidfile_lock(3)

2016-03-24 Thread Steffen Nurpmeso
Hi. "James K. Lowden" wrote: |mlel...@serpens.de (Michael van Elst) wrote: |> r...@marples.name (Roy Marples) writes: |>>See here: |>>http://mail-index.netbsd.org/tech-userlevel/2016/03/21/msg009799.html Well, btw., the MUA i maintain forks, keeping a communication pipe to its parent, then c