Re: [PATCH 5/5] crypt_make_salt(): try to use actual random bytes for salt generation

2024-04-16 Thread Steffen Nurpmeso
Rasmus Villemoes wrote in : |On 15/04/2024 21.05, Steffen Nurpmeso wrote: |> Rasmus Villemoes wrote in |> <20240415125628.780178-6-rasmus.villem...@prevas.dk>: |>|Instead of limiting the possible generated salts to 2^32 different |>|ones, try to get some actual random

Re: [PATCH 5/5] crypt_make_salt(): try to use actual random bytes for salt generation

2024-04-15 Thread Steffen Nurpmeso
Rasmus Villemoes wrote in <20240415125628.780178-6-rasmus.villem...@prevas.dk>: |Instead of limiting the possible generated salts to 2^32 different |ones, try to get some actual random bits and mix those in. Keep the |old pseudo-random generation in place, so that even if |open_read_close()

Good joke (Was: Re: [MailServer Notification]Attachment Blocking Notification)

2024-02-14 Thread Steffen Nurpmeso
%s>\n" "$#" "${1}" "${2}" "${3}" "$4" "$5" #@ saved_parameters=`quote_rndtrip "$@"` #@ eval "set -- $saved_parameters" #@ printf "%s: <%s><%s><%s><%s><%s>\n" "$#" &

Re: Failing shell code under busybox 1.36.1 that worked with 1.31.1

2024-02-14 Thread Steffen Nurpmeso
quot; #@ saved_parameters=`quote_rndtrip "$@"` #@ eval "set -- $saved_parameters" #@ printf "%s: <%s><%s><%s><%s><%s>\n" "$#" "${1}" "${2}" "${3}" "$4" "$5" # # 2017 Robert Elz (kr

Re: busybox awk doesn't allow print statements in for loop head

2023-10-30 Thread Steffen Nurpmeso
Oğuz wrote in : |Reproduce by: | | busybox awk 'BEGIN{for(print 5;0;);}' | |POSIX allows a print statement on both sides of the loop condition, so |this should print 5 (and does so with GNU awk). But it fails with this |error message instead: | |awk: cmd. line:1: Unexpected token

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-23 Thread Steffen Nurpmeso
Roberto A. Foglietta wrote in : |On Thu, 21 Sept 2023 at 20:05, Steffen Nurpmeso wrote: |>|IMHO, I vote for /sys rather than /proc/debug. The capability to There already _is_ a debugfs interface? This must be new then. I do not have debugfs no more, it is of no use for me. Sorry if i h

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-21 Thread Steffen Nurpmeso
Roberto A. Foglietta wrote in : |On Thu, 21 Sept 2023 at 02:35, Steffen Nurpmeso wrote: |> |> Steffen Nurpmeso wrote in |> <20230919222910.pn44y%stef...@sdaoden.eu>: |>|Laurent Bercot wrote in |>| : |>||>|IIRC writing to /dev/urandom doesn't do what you wan

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-20 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20230919222910.pn44y%stef...@sdaoden.eu>: |Laurent Bercot wrote in | : ||>|IIRC writing to /dev/urandom doesn't do what you want it to do. ||>|You have to use an ioctl() to actually set entropy. ||> ||>And that is the sad point about it. ||>

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-19 Thread Steffen Nurpmeso
Laurent Bercot wrote in : | |>|IIRC writing to /dev/urandom doesn't do what you want it to do. |>|You have to use an ioctl() to actually set entropy. |> |>And that is the sad point about it. |>Kernel hackers should stand up to allow it again! | | As Ted Ts'o said[1], and Donenfeld

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-19 Thread Steffen Nurpmeso
Laurent Bercot wrote in : ... | The answer's to Roberto's first question is: yes, initializing |/dev/urandom is necessary, but writing stuff to /dev/urandom will not |help, even if you consider that stuff random enough. You need a specific |tool like seedrng. No. ... | For the second

Re: RFC: initialize /dev/urandom, is it necessary? Can we do it in a better way?

2023-09-19 Thread Steffen Nurpmeso
David Laight wrote in <1628d46df2fb4580b474fd0ea43a5...@acums.aculab.com>: |> Fine, then use > (write) to reset the entropy and >> (append) to \ |> add entropy. | |IIRC writing to /dev/urandom doesn't do what you want it to do. |You have to use an ioctl() to actually set entropy. And that

Re: busybox hdparm -F is not supported but can be very useful

2023-09-12 Thread Steffen Nurpmeso
Roberto A. Foglietta wrote in : |I hope this helps, R- i have this in a file .busybox-TODO but i think it will never happen: sysklogd (notify) unshare (reaper) acpid->2 rdate (-n, -a, [-v]) less -e s-s-d status --steffen | |Der Kragenbaer,The moon bear, |der holt

Re: fyi: pstree: "somehow" mutilated

2023-07-05 Thread Steffen Nurpmeso
Hmm... Steffen Nurpmeso wrote in <20230705180345._jjfk%stef...@sdaoden.eu>: |I just stumbled upon this a minute ago, 'have not looked around. |No containers are such involved. ... | #?0|kent:$ busybox.static pstree | ?-+-2*[encfs] ||-sh---sleep ||-sleep |`-tmux: server-+-ba

fyi: pstree: "somehow" mutilated

2023-07-05 Thread Steffen Nurpmeso
Hello. I just stumbled upon this a minute ago, 'have not looked around. No containers are such involved. #?127|kent:$ busybox.static --help|head -n1 BusyBox v1.37.0.git (2023-06-15 17:50:36 CEST) multi-call binary. #?0|kent:$ busybox.static pstree ?-+-2*[encfs] |-sh---sleep

Re: [PATCH] seedrng: fix getrandom() detection for non-glibc libc

2023-04-20 Thread Steffen Nurpmeso
Thomas Devoogdt wrote in : |I can't follow everything in your mail, |but about: | |>> Having said that, the current implementation as it is here is |>> surely wrong, since the fallback getrandom returns ENOSYS, instead |>> of setting errno to ENOSYS? |>>

Re: [PATCH] seedrng: fix getrandom() detection for non-glibc libc

2023-04-19 Thread Steffen Nurpmeso
Thomas Devoogdt wrote in : |About: |>> HAVE_GETRANDOM := $(shell printf '#include \n#include \ |>> \nint main(void){char buf[256];\ngetrandom(buf,sizeof(buf)\ |>> ,GRND_NONBLOCK);}' >bb_libtest.c; $(CC) $(CFLAGS) $(CFLAGS_busybox) \ |>> -D_GNU_SOURCE -o /dev/null | |Is it a good idea to

Re: busybox seq doesn't handle negative numbers

2023-04-05 Thread Steffen Nurpmeso
David Laight wrote in <431dc1a049e445c6aaf57b8995f46...@acums.aculab.com>: |... |> Yeah, the thing rather is that GNU getopt parses the command line |> and performs reorders. I never really looked, but since the |> (entire family of the) mailer i maintain earned a security |> advisory for

Re: busybox seq doesn't handle negative numbers

2023-04-04 Thread Steffen Nurpmeso
Dominique Martinet wrote in : |Keith Thompson wrote on Mon, Apr 03, 2023 at 10:15:40PM -0700: |> The GNU coreutils seq command recognizes and handles negative |> arguments. |> |> The busybox seq command does not. Any argument starting with a '-' |> character is assumed to be an option

Re: [PATCH v2] miscutils/seedrng.c: fix include error on glibc < 2.25

2023-02-17 Thread Steffen Nurpmeso
Thomas Devoogdt wrote in : |Perhaps the whole function should be rewritten to simply fallback to that |syscall rather than directly fallback to /dev/random? Better not. |Or should I replace the define (-1) by that syscall? It was more a well hm joke. But i have fill =

Re: [PATCH v2] miscutils/seedrng.c: fix include error on glibc < 2.25

2023-02-17 Thread Steffen Nurpmeso
Ach, if he would have kept that "cat STUFF > /dev/u?random". Is there really a technical reason to require a special program. That is so un-UNIXish. There was a syscall even earlier, but, you know. #include int main(void){ char buf[256]; syscall(SYS_getrandom, buf,

Re: The busybox website is unbearably slow

2023-01-19 Thread Steffen Nurpmeso
Guillermo Rodriguez Garcia wrote in : |Perhaps the static website could be moved somewhere else (Github Pages, |Netlify, etc). This would solve the problem for the static sites, and |alleviate the load for git.busybox.net. lighttpd now supports KTLS. I am super happy with it. But i have

Re: ash: redirection bug (temporary file reuse, race condition??)

2023-01-17 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20230117202333.p9gnd%stef...@sdaoden.eu>: ... |Forget about this please, bash shows the same problems, but |i still have not understood why. |(Has nothing to do with monitor mode.) Signal cums and causes childs to think they can go. Likely. Sorry for the

ash: redirection bug (temporary file reuse, race condition??)

2023-01-17 Thread Steffen Nurpmeso
Hello. Imagine this file: #!/sbin/busybox.static ash #set -m ( echo >&2 "inner shell has: $(ps -o pid,pgid $$ | tail -n1)" ) & echo >&2 "outer shell has: $(ps -o pid,pgid $$ | tail -n1)" echo >&2 "x is $$, job is $!: $(ps -o pid,pgid $! | tail -n1)" If in a t2.sh and run it

ash: support "set -m" monitor mode even when not interactive

2023-01-17 Thread Steffen Nurpmeso
e63ede983a138a3fc86fb51428b957dda1ae9157 Mon Sep 17 00:00:00 2001 Message-Id: From: Steffen Nurpmeso Date: Tue, 17 Jan 2023 21:07:07 +0100 Subject: [PATCH] ash: Allow enabling job control without a tty in non-interactive mode.. This is a take-over of the FreeBSD bin/sh commit cd60e2c67d52e1f957841af19128c7227880743a

Re: ash: redirection bug (temporary file reuse, race condition??)

2023-01-17 Thread Steffen Nurpmeso
Hello.. Steffen Nurpmeso wrote in <20230117185938.u5tc3%stef...@sdaoden.eu>: ... | #?0|kent:tmp$ ./t2.sh | inner shell has: 18587 18587 | outer shell has: 18587 18587 | x is 18587, job is 18588: 18588 18587 | #?0|kent:tmp$ ./t2.sh | inner shell has: 18621 18621 | outer she

Re: BusyBox 1.36.0 regression: Segfaults on i386 musl libc

2023-01-10 Thread Steffen Nurpmeso
So i am really, really sorry to be here once again. (And without really looking) Natanael Copa wrote in <20230110131112.4d6022cc@ncopa-desktop>: |On Sun, 08 Jan 2023 20:22:31 +0100 |Sören Tempel wrote: |> Investigated this further. The problem is a text relocation created by |> the

Re: BusyBox 1.36.0 regression: Segfaults on i386 musl libc

2023-01-06 Thread Steffen Nurpmeso
Natanael Copa wrote in <20230106103415.7eec7...@ncopa-desktop.lan>: |On Thu, 05 Jan 2023 21:39:09 +0100 |Sören Tempel wrote: ... |> Looking at the backtrace, it seems that it segfaults in musl's dynamic |> loader. Since BusyBox 1.35.0 worked fine on x86 I bisected this and it |> turns out

Re: [PATCH] shell: avoid segfault on ${0::0/0~09J}. Closes 15216

2022-12-29 Thread Steffen Nurpmeso
Ron Yorston wrote in <63ad9a0f.mqrbkx7zm8pqj639%...@pobox.com>: |Both ash and hush segfault when asked to evaluate ${0::0/0~09J}. ... | shell/math.c | 3 ++- ... Without hurry or pressure or any of such sort, but to be more explicit than in the patch commit message of the thing i had sent, it

Re: [PATCH v5] shell: exchange Dijkstra $(( )) evaluator..

2022-11-08 Thread Steffen Nurpmeso
(P.S.: not tested with hush, actually.) --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 Gernhardt) ___ busybox mailing

[PATCH v5] shell: exchange Dijkstra $(( )) evaluator..

2022-11-08 Thread Steffen Nurpmeso
The former implementation was not correct regarding whiteouts in ?: conditional branches. The new one also parses a bit better, in effect on equal level than bash with its recursive descendent parser. A patch iteration saw bugfixes suggested by Harald van Dijk. function

Re: FS="\0" differences

2022-11-08 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20221107194134.i5yn8%stef...@sdaoden.eu>: |I do not know how portable / desired, but stumbled upon | | #?0|kent:src$ printf 'a\0b\0c\0' | gawk 'BEGIN{FS="\0"} {for(i=0; \ | i < NF; ++i) print i, $i}' | 0 abc | 1 a | 2 b | 3 c | #?0|ken

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-11-07 Thread Steffen Nurpmeso
Hey, Steffen Nurpmeso wrote in <09f36b9e8c5793662b0f788b3396d02e7f1cb9ed.1661902741.git.steffen@sdaoden\ .eu>: |The former implementation was not correct regarding whiteouts in |?: conditional branches. The new one also parses a bit better, in |effect on equal level than bash wi

FS="\0" differences

2022-11-07 Thread Steffen Nurpmeso
Hello. I do not know how portable / desired, but stumbled upon #?0|kent:src$ printf 'a\0b\0c\0' | gawk 'BEGIN{FS="\0"} {for(i=0; i < NF; ++i) print i, $i}' 0 abc 1 a 2 b 3 c #?0|kent:src$ printf 'a\0b\0c\0' | mawk 'BEGIN{FS="\0"} {for(i=0; i < NF; ++i) print i, $i}' 0 abc 1 a

Re: busybox init returns fails with error code -1 (0x00007f00)

2022-10-26 Thread Steffen Nurpmeso
Bernhard Reutner-Fischer wrote in : |> written. Using an emulator like qemu |> -cdrom ../my.iso -m 512m or the |> qemu-system-i386 variant that you target | |And yes, that's a bit exaggerated. |In former times you could have plenty space left on a box with 2MB \ |RAM even when running

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-10 Thread Steffen Nurpmeso
ARGH Steffen Nurpmeso wrote in <20220909131735.s5lde%stef...@sdaoden.eu>: |P.S.: ARGH, II.! |Steffen Nurpmeso wrote in | <20220906193906.l5sy8%stef...@sdaoden.eu>: ||Bernhard Reutner-Fischer wrote in || <20220906183821.1f82672d@nbbrfq>: |||On Wed, 31 Aug 2

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-09 Thread Steffen Nurpmeso
P.S.: Steffen Nurpmeso wrote in <20220906193906.l5sy8%stef...@sdaoden.eu>: |Bernhard Reutner-Fischer wrote in | <20220906183821.1f82672d@nbbrfq>: ||On Wed, 31 Aug 2022 01:43:26 +0200 ||Steffen Nurpmeso wrote: ... ||> + if(su_64( i > U32_MAX || ) i >= UZ_MAX

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-07 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220907161808.uye_3%stef...@sdaoden.eu>: |Harald van Dijk wrote in | <16238a7b-c165-796f-a137-d5d119bf8...@gigawatt.nl>: ||On 07/09/2022 13:43, Steffen Nurpmeso wrote: ||> Harald van Dijk wrote in ||> <92eff87d-3bfe-b1bb-03e1-5f2

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-07 Thread Steffen Nurpmeso
Harald van Dijk wrote in <16238a7b-c165-796f-a137-d5d119bf8...@gigawatt.nl>: |On 07/09/2022 13:43, Steffen Nurpmeso wrote: |> Harald van Dijk wrote in |> <92eff87d-3bfe-b1bb-03e1-5f2801844...@gigawatt.nl>: |>... |>|The supplied patch appears to fix both #1 and

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-07 Thread Steffen Nurpmeso
Harald van Dijk wrote in <92eff87d-3bfe-b1bb-03e1-5f2801844...@gigawatt.nl>: |On 06/09/2022 20:39, Steffen Nurpmeso wrote: |>|What was the initial expression that did not work properly with the old |>|implementation? |> |> Well if you run the test of the patchs

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-06 Thread Steffen Nurpmeso
Kang-Che Sung wrote in : |On Wednesday, September 7, 2022, Steffen Nurpmeso |wrote: ... |>|> + if(su_64( i > U32_MAX || ) i >= UZ_MAX / 2 || ... |>|I have to admit that the amount of macro maze makes it really hard to |>|read ;) |> |> Well it is easier th

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-06 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220906193906.l5sy8%stef...@sdaoden.eu>: ... ||Missing license statement here? ... ||Ah, here is the license. Please move it to line 2 ? ... Btw i have no problem with relicensing this to Public Domain, or even simply removing the (ISC) license,

Re: [PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-09-06 Thread Steffen Nurpmeso
Hello. Bernhard Reutner-Fischer wrote in <20220906183821.1f82672d@nbbrfq>: |On Wed, 31 Aug 2022 01:43:26 +0200 |Steffen Nurpmeso wrote: | |> The former implementation was not correct regarding whiteouts in |> ?: conditional branches. The new one also parses a bit better, i

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
alice wrote in : |On Mon Sep 5, 2022 at 4:58 PM CEST, Steffen Nurpmeso wrote: |> Steffen Nurpmeso wrote in |> <20220905143118.ysd0g%stef...@sdaoden.eu>: ... |what does any of this have to do with busybox? Nothing. Sorry. --steffen | |Der Kragenbaer,The moo

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220905215546.2vfqe%stef...@sdaoden.eu>: |Xabier Oneca -- xOneca wrote in | : ||busybox tree has no file named "shexp-arith.h", ||> yet your patch is against that file. ||> ||> Do you see this file here? ||> https://git.bu

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Xabier Oneca -- xOneca wrote in : |busybox tree has no file named "shexp-arith.h", |> yet your patch is against that file. |> |> Do you see this file here? |> https://git.busybox.net/busybox/tree/shell | | |That file is added in one of his first patches a while ago. Later, he has |sent

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Denys Vlasenko wrote in : |On Mon, Sep 5, 2022 at 4:31 PM Steffen Nurpmeso wrote: |> Sure is that Kyiv Rus _never_ owned anything of the country that |> is currently being fight in on the ground. It was a gift, a gift |> to overcome a century old i-do-not-know-what in bet

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220905143118.ysd0g%stef...@sdaoden.eu>: ... |Yes. If i had to say anything, our Bundeskanzler would be charged |and brought to the international court in Den Haag i think it is. |But then again, i am sure nothing bad would happen to him, which

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220905124655.m6q1h%stef...@sdaoden.eu>: |Denys Vlasenko wrote in | : ||On Wed, Aug 31, 2022 at 1:35 AM Steffen Nurpmeso \ ||wrote: ||> ||> Denys Vlasenko wrote in ||> : ||>|Your patches seem to be against dash, not busybox git tree? ||&

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-09-05 Thread Steffen Nurpmeso
Denys Vlasenko wrote in : |On Wed, Aug 31, 2022 at 1:35 AM Steffen Nurpmeso \ |wrote: |> |> Denys Vlasenko wrote in |> : |>|Your patches seem to be against dash, not busybox git tree? |> |> No? I think dash uses a yacc thing..? (That only supports the |> most

[PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

2022-08-30 Thread Steffen Nurpmeso
The former implementation was not correct regarding whiteouts in ?: conditional branches. The new one also parses a bit better, in effect on equal level than bash with its recursive descendent parser. --- All-in-one v4. Compares to v3 like - * the entire condition, it's number

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-08-30 Thread Steffen Nurpmeso
Denys Vlasenko wrote in : |Your patches seem to be against dash, not busybox git tree? No? I think dash uses a yacc thing..? (That only supports the most basic things, as per POSIX, which is two steps back for busybox. But smaller i presume.) And sorry for lots of noise over weeks! I have

[PATCH 3/3] shell: $(()): add tests

2022-08-26 Thread Steffen Nurpmeso
--- shell/ash_test/ash-arith/bigbadbison.right | 880 ++ shell/ash_test/ash-arith/bigbadbison.tests | 914 +++ shell/hush_test/hush-arith/bigbadbison.right | 880 ++ shell/hush_test/hush-arith/bigbadbison.tests | 914 +++ 4 files

[PATCH 2/3] shell: $(()): sync (comments, a bit reorder, one small fix)

2022-08-26 Thread Steffen Nurpmeso
--- shell/shexp-arith.h | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/shell/shexp-arith.h b/shell/shexp-arith.h index bc2ca52784..71c848455d 100644 --- a/shell/shexp-arith.h +++ b/shell/shexp-arith.h @@ -482,7 +482,13 @@

[PATCH 1/3] shell: plug SH_MATH_ERROR_TRACK memory leak

2022-08-26 Thread Steffen Nurpmeso
--- Hello. I have to come back unfortunately with this memory plug fix in case SH_MATCH_ERROR_TRACK is enabled. The second patch sync shexp-arith.h with my local version, i made a review and that changed some comments, i did a logical code reorder, and one superfluous value toggle i removed,

[PATCHv3] shell: exchange Dijkstra $(( )) evaluator..

2022-08-19 Thread Steffen Nurpmeso
ssions. + *@ + *@ #define's: + *@ - a_SHEXP_ARITH_COMPAT_SHIMS: for inclusion in other code bases, setting + *@ this defines most necessary compat macros. + *@ We still need s64, u64, S64_MIN, savestr(CP) <> strdup(3) that does not + *@ return NIL (only with _ERROR_TRACK). Plus stdint.h, c

[PATCH] shell: $(()): fix two more (?: whiteout related) errors

2022-08-19 Thread Steffen Nurpmeso
--- 20220818231006.zyhyj%stef...@sdaoden.eu: I just fixed two other bugs regarding $: ternary resolution which affect strange cases regarding precedence in whiteouts $((0?I1=10:(1?I3:I2=12))) vs $((0?I1=10:(0?I3:I2=12))) as well as a missing variable-expansion prevention in a

[PATCH] shell: $(()): hush.c,math.c: fix two usage bugs of new evaluator

2022-08-19 Thread Steffen Nurpmeso
--- shell/hush.c | 4 +++- shell/math.c | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shell/hush.c b/shell/hush.c index f59bb57b3b..15b36bbe41 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -6843,8 +6843,10 @@ static NOINLINE int expand_one_var(o_string *output, int n,

Re: [PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-08-18 Thread Steffen Nurpmeso
I just fixed two other bugs regarding $: ternary resolution which affect strange cases regarding precedence in whiteouts $((0?I1=10:(1?I3:I2=12))) vs $((0?I1=10:(0?I3:I2=12))) as well as a missing variable-expansion prevention in a whiteout. (Let me allow to keep saying whiteout, please.)

[PATCH] shell: fix $(()) precedence bug in "X=A?B:C" (it is _not_ "(X=A)?..)"

2022-08-11 Thread Steffen Nurpmeso
--- It was a one line fix. Five more tests +s I1=5 I2=10 I3=20;p "<$((I1-=5,1?I2:I3))>";e "<$I1><$I2><$I3>" +s I1=5 Ix=6 I2=10 I3=20;p "<$((I1=Ix,1?I2:I3))>";e "<$I1><$I2><$I3>" +s I1=5 Ix=6 I2=10 I3=20;p "<$((I1=Ix?I2:I3))>";e "<$I1><$I2><$I3>" +s I1=5 Ix=6 I2=10 I3=20;p

Re: [PATCH] shell: fill in tremendous $(()) evaluator miss

2022-08-11 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220811141842.il4q6%stef...@sdaoden.eu>: ... P.S.: we are of course in the field of things which are beyond standard definitions. And there _are_ bugs in the bash evaluator, on the same precedence level as i have shown: $ bash -c ' I1=I2=10 I2=5 I3=I2+=1

Re: [PATCH] shell: fill in tremendous $(()) evaluator miss

2022-08-11 Thread Steffen Nurpmeso
Sigh. I am deeply sorry, but i really have to come back. Now, this is ridiculous. I am sorry for that. ... |The three new tests | | s I1=I2=0 I2=5 I3=I2+=1;p "<$((I1?I1:I3))>";e "<$I1><$I2><$I3>" | s I1=I1=10 I2=5 I3=I2+=1;p "<$((I1=0?I1:I3))>";e "<$I1><$I2><$I3>" | s I1=I1=10 I2=5

[PATCH] shell: fill in tremendous $(()) evaluator miss

2022-08-10 Thread Steffen Nurpmeso
--- I found the hopefully last problem. It is a mystery how _that_ miss was not caused by any of the tests yet; only because of busybox different stack pattern it was catched at all! The three new tests s I1=I2=0 I2=5 I3=I2+=1;p "<$((I1?I1:I3))>";e "<$I1><$I2><$I3>" s I1=I1=10 I2=5

Re: [PATCHv2] shell: exchange Dijkstra $(( )) evaluator..

2022-08-10 Thread Steffen Nurpmeso
Hm. Sorry to cause more distress, but i ran into this: $ bash -c ' I1=I2=10 I2=5 I3=I2+=1; echo "<$(( I1?I1:I3 ))>";echo "<$I1><$I2><$I3>"' <10> <10> $ s-nail -#:/ -Y 'set I1=I2=10 I2=5 I3=I2+=1;echo "<$(( I1?I1:I3 ))>";echo "<$I1><$I2><$I3>"' -Yx <10> <10> $ ../busybox sh -c '

Re: [PATCHv2] shell: exchange Dijkstra $(( )) evaluator..

2022-08-10 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <2adea39306d7d9b64518729b2c1285b5d3efb2b5.1660144825.git.steffen@sdaoden\ .eu>: ... |Ok i am out of ideas on further tests, and it works. And attached is the new test (not that much different). --steffen | |Der Kragenbaer,The moon bear, |de

[PATCHv2] shell: exchange Dijkstra $(( )) evaluator..

2022-08-10 Thread Steffen Nurpmeso
const char *expr); diff --git a/shell/shexp-arith.h b/shell/shexp-arith.h new file mode 100644 index 00..4b23746df1 --- /dev/null +++ b/shell/shexp-arith.h @@ -0,0 +1,1128 @@ +/*@ S-nail - a mail user agent derived from Berkeley Mail. + *@ Signed 64-bit sh(1)ell-style $(( ARITH ))metic expression evaluat

Re: [PATCH] shell: shexp-arith: also bring "I1=I2=10 I2=3; echo $(( I1, I2 ))" to bash

2022-08-08 Thread Steffen Nurpmeso
Hello! Steffen Nurpmeso wrote in <8629f1bb0471e00284eac7c61b06f9eea999ec1a.1659730455.git.steffen@sdaoden\ .eu>: ... |You will not believe it, but now that i was reading over the mail |i sent to busybox@ i saw a comma related bug in _op_apply(), and |that lead me to anothe

[PATCH] shell: tweak latter: apply to all operators

2022-08-05 Thread Steffen Nurpmeso
--- Arriba Arriba Andale Andale! P.S.: i also have written a graylister for postfix, in C. 94003 bytes, works just smooth for months; is a package in Alpine, and has a focus-sender mode that i now use and that is in no way worse than long delays. In fact better to me, because i also have private

[PATCH] shell: shexp-arith: also bring "I1=I2=10 I2=3; echo $(( I1, I2 ))" to bash

2022-08-05 Thread Steffen Nurpmeso
--- Hello! You will not believe it, but now that i was reading over the mail i sent to busybox@ i saw a comma related bug in _op_apply(), and that lead me to another test, and that then to another fix even! shell/shexp-arith.h | 19 ++- 1 file changed, 14 insertions(+), 5

[PATCH] shell: exchange Dijkstra $(( )) evaluator..

2022-08-05 Thread Steffen Nurpmeso
tack has the same or greater precedence as op, + *@ Pop the operator from the operator stack. + *@ Pop the value stack twice, getting two operands. + *@ Apply the operator to the operands, in the correct order. + *@ Push the result onto the

Re: [PATCH] shell: exchange Dijkstra $(( )) evaluator..

2022-08-05 Thread Steffen Nurpmeso
Here is the test script. --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 Gernhardt) command -v shopt && shopt -s expand_aliases alias p=printf;alias e=echo;alias

Re: [PATCH v2] seedrng: limit poolsize to 256 bytes and document flock() and fsync() usage

2022-04-30 Thread Steffen Nurpmeso
Ok my last mail, promised. Jason A. Donenfeld wrote in : .. |This reads as complete gibberish to me, sorry. Please stop with this \ |nonsense. Like i said i think (in private?) i had only read the "Documentation and Analysis of the Linux Random Number Generator - Last updated: April 2020"[1]

Re: [PATCH v2] seedrng: limit poolsize to 256 bytes and document flock() and fsync() usage

2022-04-30 Thread Steffen Nurpmeso
Jason A. Donenfeld wrote in : ... |Again, stop charging steadfastly toward creating vulnerabilities |because you don't understand things. The scenario is: | |- RNG is seeded and credited using file A. |- File A is unlinked but not fsync()d. |- TLS connection does something and a nonce is

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-29 Thread Steffen Nurpmeso
Denys Vlasenko wrote in : ... |Even partial removal of these complicated error paths |cuts down the size by ~10% A bit off topic but i personally am still thinking, really, that people would rather be reenabled to do what they did for long. ports/core/rc/rc ^e3afe2298e (Johannes Winkelmann

Re: [PATCH v8] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-20 Thread Steffen Nurpmeso
Hello Jason. Jason A. Donenfeld wrote in : |On Tue, Apr 19, 2022 at 7:29 PM Steffen Nurpmeso \ |wrote: |> In my entropy_saver.c i did |> |>/* For at least statistics query entropy count once */ |>rv = ioctl(randfd, (int)RNDGETENTCNT, ); |> |> regardles

Re: suspected bug in timeout command

2022-03-02 Thread Steffen Nurpmeso
Raffaello D. Di Napoli wrote in <3b0697d2-01b6-d36b-10da-32d8cf917...@dinapo.li>: |On 3/2/22 03:50, Michael Conrad wrote: |> On 3/2/22 02:45, Raffaello D. Di Napoli wrote: |>> On 3/1/22 16:57, Denys Vlasenko wrote: |>>> On Tue, Mar 1, 2022 at 5:39 PM Denys Vlasenko |>>> wrote: ... |

Re: suspected bug in timeout command

2022-03-01 Thread Steffen Nurpmeso
David Laight wrote in <3c1a02d162c34e908af85ac008a87...@acums.aculab.com>: |From: Steffen Nurpmeso |> Sent: 01 March 2022 17:49 |> David Laight wrote in |> : |>|From: Denys Vlasenko |>|> Sent: 01 March 2022 16:40 |>|> On Tue, Feb 15, 2022 at 12:31 PM Rob Lan

Re: suspected bug in timeout command

2022-03-01 Thread Steffen Nurpmeso
Denys Vlasenko wrote in : |On Tue, Mar 1, 2022 at 6:52 PM Steffen Nurpmeso wrote: |> David Laight wrote in |> : |>|From: Denys Vlasenko |>|> Sent: 01 March 2022 16:40 |>|> On Tue, Feb 15, 2022 at 12:31 PM Rob Landley wrote: |>|>> On 2/14/22 10:09

Re: suspected bug in timeout command

2022-03-01 Thread Steffen Nurpmeso
Hello. ..despite that particular timeout(1), i have not looked.. David Laight wrote in : |From: Denys Vlasenko |> Sent: 01 March 2022 16:40 |> On Tue, Feb 15, 2022 at 12:31 PM Rob Landley wrote: |>> On 2/14/22 10:09 AM, Roberto A. Foglietta wrote: ... |> My memory is hazy on this, but

Re: Drop privileges for udhcp

2022-02-23 Thread Steffen Nurpmeso
Bobby Mah wrote in : |Hello folks! | |I would like udhcp to use setuid so that it can drop privileges after the |server socket is built. However, the server socket is inside a loop and is |re-created every time there's a bad packet. | |I am proposing moving the server socket out of the

v1.33.0: tc(8): "dev" keyword: argv off-by-one, false code flow

2021-07-08 Thread Steffen Nurpmeso
Hello again. #?0|kent:~# tc qdisc show dev browse qdisc noqueue 0: root refcnt 2 #?0|kent:~# busybox.static tc qdisc show dev browse tc: invalid argument 'SHELL=/bin/bash' to 'command' In the "arg == ARG_dev" branch of tc_main(), there is a "continue" missing. diff --git

awk error as of git / today

2021-07-08 Thread Steffen Nurpmeso
Hello. Unfortunately the bug tracker does not work at the moment, says the bugtracker (and i am stuck in admin queue). But i do not know whether git HEAD makes up a bug report anyhow, yet i was not subscribed. Now i am. Anyhow, all i know is $ AWK=nawk dash mdocmx.sh mdocmx.1|wc -l 137 $

Re: [PATCH] sysklogd/sysklogd.c: add config FEATURE_ROTATE_NOTIFY, with -H PROG

2016-03-08 Thread Steffen Nurpmeso
i wrote: |Maybe you find this useful. I was wondering how to get my logs Admittedly i don't understand why you don't, since a hook from the event source directly is so much less to do than going over inotifyd, from wherever you look at it. But at least Alpine ships with that one, so i can do