Re: [PATCH] docproc: avoid segfault during file closing

2024-04-13 Thread Denys Vlasenko
Applied, thank you. On Mon, Sep 11, 2023 at 6:03 PM Yan Zhu wrote: > > In the function find_export_symbols, since the fopen file does not > exit when it fails, there is a dereference problem in fclose(fp), > which will cause a segmentation fault. > > Signed-off-by: Yan Zhu > --- >

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

2024-02-26 Thread Denys Vlasenko
On Thu, Feb 15, 2024 at 9:52 AM David Leonard wrote: > > _result="$_result '${_p//'/'\"'\"'}'" > > Busybox ash has a CONFIG_ASH_BASH_COMPAT config to get this ${var//...} > replacement behaviour. And, in bash, the ' in the pattern section is treated > as a quote start. To give the ' a

Re: [RESEND PATCH 1/1] ip link: support for the CAN netlink

2024-02-26 Thread Denys Vlasenko
On Sun, Feb 25, 2024 at 10:13 AM Dario Binacchi wrote: > I developed this application to test the Linux kernel series [1]. As > described in it I could not use the iproute2 package since the > microcontroller is without MMU. I don't think we need to have "iplinkcan" applet. (I'm not sure having

Re: [PATCH] hush: Prevent segfault at unexpected EOF in script.

2024-02-25 Thread Denys Vlasenko
On Sat, Feb 10, 2024 at 4:51 PM Dmitry Chestnykh wrote: > See https://bugs.buildroot.org/show_bug.cgi?id=15937 . > With this patch the execution of reproducer script > from bugzilla leads to the following output: > 'hush: syntax error: unexpected EOF' > > Signed-off-by: Dmitry Chestnykh > --- >

Re: Print full username and groupname for ls command

2024-02-24 Thread Denys Vlasenko
I think we can simply stop the truncation, like this: - column += printf("%-8.8s %-8.8s ", + column += printf("%-8s %-8s ", without additional loop to measure max length. On Mon, Feb 19, 2024 at 3:09 PM Matthew Chae wrote: > > Hi

Re: [PATCH resend] sed: check errors writing file with sed -i

2024-01-01 Thread Denys Vlasenko
Applied, thank you! On Tue, Sep 19, 2023 at 10:11 AM Dominique Martinet wrote: > > From: Dominique Martinet > > sed would currently not error if write failed when modifying a file. > > This can be reproduced with the following 'script': > $ sudo mount -t tmpfs tmpfs -o size=1M /tmp/m > $ sudo

Re: [PATCH] xvfork: override die_func to _exit on child processes

2024-01-01 Thread Denys Vlasenko
On Fri, Dec 15, 2023 at 6:57 AM Dominique Martinet wrote: > > > > For this particular problem die_func could just be overriden in > > > > time.c's run_command after vfork, but this problem actually came up > > > > before in shell/hush.c as per the fflush_and__exit comment so it seems > > > > more

Re: [PATCH] time: fix max resident set size unit

2023-12-31 Thread Denys Vlasenko
Applied, thank you. Looks like ALL memory fields are in kbytes, so ptok() is wrong everywhere. I'm commenting it out. On Wed, Dec 20, 2023 at 12:30 PM Natanael Copa wrote: > > The ru_maxrss is already in Kbytes and not pages. > > function old new

Re: [PATCH] Re: bug in busybox awk handling of empty fields

2023-12-31 Thread Denys Vlasenko
Applied, thank you! On Fri, Dec 22, 2023 at 4:18 PM M Rubon wrote: > > I wanted to resend this, tagging that there is a one-line patch included > > diff --git a/editors/awk.c b/editors/awk.c > index bc95c4155..60b8276e7 100644 > --- a/editors/awk.c > +++ b/editors/awk.c > @@ -1983,3 +1983,3 @@

Re: fix large PID overflow their column in top command

2023-11-23 Thread Denys Vlasenko
On Fri, Nov 10, 2023 at 4:22 PM Matthew Chae wrote: > Hi Denys, > > I'm sending the patch what I've mentioned. Can you take a look at this? > If I don't understand correctly what you said before, let me know. > > The max PID value can have 7 digits as the 4194304. > > Busybox v1.36 released a

Re: [PATCH] xvfork: override die_func to _exit on child processes

2023-11-08 Thread Denys Vlasenko
On Wed, Nov 8, 2023 at 3:58 AM Dominique Martinet wrote: > > From: Dominique Martinet > > On alpine linux, calling busybox time with a nonexisting command would > hang forever: > ``` > time: can't execute 'fdsa': No such file or directory > Command exited with non-zero status 127 > real0m

Re: -o option for start-stop-daemon

2023-11-08 Thread Denys Vlasenko
On Tue, Nov 7, 2023 at 7:27 PM Louai Al-Khanji wrote: > On Tue, Nov 7, 2023 at 8:03 AM Denys Vlasenko > wrote: > > On Fri, Nov 3, 2023 at 11:31 PM Louai Al-Khanji wrote: > > > Attached is a proposed patch. Any feedback would be appreciated. > > > > My experime

Re: -o option for start-stop-daemon

2023-11-08 Thread Denys Vlasenko
Fixed! Thank you On Tue, Nov 7, 2023 at 9:50 PM Peter Korsgaard wrote: > > >>>>> "Denys" == Denys Vlasenko writes: > > > Applied with some edits, please test current git. > > Looks sensible from a quick look. Notice that you added a s/PILE/FILE

Re: fix large PID overflow their column in top command

2023-11-08 Thread Denys Vlasenko
On Wed, Nov 1, 2023 at 10:18 AM Matthew Chae wrote: > > Hi maintainer, > > I'd like to hear your opinion regarding large PID can overflow its column in > top command. > > The max PID value can have 7 digits as the 4194304. > Busybox v1.36 released a new patch to handle large PID value in top

Re: -o option for start-stop-daemon

2023-11-07 Thread Denys Vlasenko
t; > V3 attached. > > > > Rebased against master to account for the -d option. Moves the output > > variable from the globals struct to be local to main. > > > > Thanks, > > Louai > > > > On Tue, Nov 7, 2023 at 10:27 AM Louai Al-Kh

Re: [PATCH 1/1] sleep: Update doc

2023-11-07 Thread Denys Vlasenko
Applied, thank you. On Fri, Nov 3, 2023 at 9:14 PM Petr Vorel wrote: > > 4c20d9f2b removed FEATURE_FLOAT_SLEEP option, thus since then there are > only two variants. > > Fixes: 4c20d9f2b ("extend fractional duration support to "top -d N.N" and > "timeout"") > Signed-off-by: Petr Vorel > --- >

Re: -o option for start-stop-daemon

2023-11-07 Thread Denys Vlasenko
On Fri, Nov 3, 2023 at 11:31 PM Louai Al-Khanji wrote: > > On Wed, Nov 1, 2023 at 11:53 PM Louai Al-Khanji wrote: > > > > Hi, > > > > I am interested in implementing the -o|--output option that the Debian > > start-stop-daemon supports. Might such a patch be considered for > > upstreaming? > >

Re: [PATCH] start-stop-daemon: add chdir option

2023-11-06 Thread Denys Vlasenko
Applied, thank you. On Wed, Oct 25, 2023 at 4:44 PM Esa Jääskelä wrote: > > Add option to change the running directory before starting the process. > This can be done using -d or --chdir options. Add also test cases to > start-stop-daemon to test out the directory change option. > >

Re: [PATCH] udhcp: Avoid leaking uninitialized/stale data

2023-10-04 Thread Denys Vlasenko
read by the get_option function. > > [1] > https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 > [2] > https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=58d397ba74873384aee449690a9070bacd5676fa >

Re: [PATCH] syslogd: fork after init on a regular system, not before

2023-10-03 Thread Denys Vlasenko
Pushed to git, thank you. On Sun, Jun 18, 2023 at 9:24 AM Michael Tokarev wrote: > > 14.06.2023 23:58, Michael Tokarev wrote: > > 14.06.2023 23:52, Michael Tokarev wrote: > >> Actually it doesn't work on regular system too, the fd#0 is redirected > >> from /dev/null somewhere down the line and

Re: Support -E in awk

2023-10-02 Thread Denys Vlasenko
Pushed to git. Can you review and test? On Thu, Sep 21, 2023 at 5:13 PM Philip Prindeville wrote: > > Hi, > > We have some scripts written in awk that we'd like to have take flags, but > when the script is embedded in a hashbang file (#!/usr/bin/awk -f), then awk > ends up consuming any

Re: [PATCH] install: Fix chown resetting suid/sgid bits from chmod

2023-10-02 Thread Denys Vlasenko
Applied, thank you. On Sat, Sep 23, 2023 at 1:57 PM Nero wrote: > > Since Linux 2.2.13, chown(2) resets the suid/gid bits for all users. > This patch changes the ordering so that chmod gets called after chown. > > This behavior follows GNU coreutils. > > Signed-off-by: Nero > --- >

Re: `sleep` fails if called with an end-of-options delimiter `--`

2023-10-02 Thread Denys Vlasenko
Fixed in git. Thank you. On Sun, Jun 25, 2023 at 4:19 PM Lucas Larson wrote: > > package: busybox > version: 1.36.1 > > Bug description: > When using the `sleep` command with the end-of-options delimiter `--` (that > is, `sleep -- 1` or `busybox sleep -- 1`), the command fails to execute >

Re: Add *sum -b (brief, hash only) option.

2023-08-31 Thread Denys Vlasenko
On Thu, Aug 31, 2023 at 11:02 AM Rob Landley wrote: > Something toybox has had for years, thought you guys might be interested. A > way > to get these things to output ONLY the hash, so it's more easily scriptable. > > In the gnu/dammit version -b says not to strip DOS newlines, which we already

Re: [PATCH] tsort: avoid use-after-free

2023-08-31 Thread Denys Vlasenko
Applied, thank you. On Tue, Aug 22, 2023 at 10:38 AM Ron Yorston wrote: > > When the input data contained a cycle it was possible for tsort to > attempt to access freed nodes. This sometimes resulted in the > test case 'echo a b b a | tsort' crashing. > > Don't free nodes when they're removed

Re: [PATCH] ash: initialize basepf.buf in ash

2023-08-30 Thread Denys Vlasenko
Applied, thank you On Tue, Aug 29, 2023 at 2:49 PM Yan Zhu wrote: > > From: zhuyan > > When I planned to print the command in read_line_input, I found that after > the system started, the command printed for the first time was always > garbled. > > After analysis, it is found that in the init()

Re: [PATCH] getfattr: new applet

2023-07-16 Thread Denys Vlasenko
Applied, thank you. Please try current git. I would like to check how we do on errors. How to easily get getxattr error? Neither sysfs, procfs, nor devtmpfs throw errors on it. On Fri, Jul 7, 2023 at 10:45 AM LoveSy wrote: > > function old new

Re: [PATCH v2] hwclock: add get/set parameters option

2023-07-12 Thread Denys Vlasenko
On Tue, Jul 11, 2023 at 10:43 AM Andrej Picej wrote: > --- a/include/rtc_.h > +++ b/include/rtc_.h > @@ -22,6 +22,11 @@ int rtc_xopen(const char **default_rtc, int flags) > FAST_FUNC; > void rtc_read_tm(struct tm *ptm, int fd) FAST_FUNC; > time_t rtc_tm2time(struct tm *ptm, int utc) FAST_FUNC;

Re: [PATCH] libiproute: fix filtering ip6 route by table id

2023-07-09 Thread Denys Vlasenko
Applied, thank you. On Sun, Mar 5, 2023 at 2:38 AM Yousong Zhou wrote: > > > > The very same code exists in current iproute2 git tree. > > > Is it also buggy in the same way? > > > > Hi Denys > > > > I checked before and iproute2 works just fine. The code is a bit different: > > Friendly ping.

Re: [PATCH] syslogd: fork after init on a regular system, not before

2023-06-13 Thread Denys Vlasenko
I think we can delay daemonizing in both cases. Please try current git. On Thu, Jun 8, 2023 at 10:44 AM Michael Tokarev wrote: > > Current syslogd performs all init after daemonizing, meanwhile > main process exits successfully. This means any errors during init > will not be even shown up

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

2023-06-12 Thread Denys Vlasenko
Sorry for missing your fix for so long. I would like to avoid having numstack[] too large, so I'm adding some code to bail out early if we see a number immediately followed by a number or a name, which is never valid. Thus, the current allocation will not be overflowed. Please try current git.

Re: hush: BUG in varexp2 when doing a=${a:+$a }a

2023-06-12 Thread Denys Vlasenko
Fixed in git. Thank you. On Sun, Jun 4, 2023 at 1:23 PM Aleksander Mazur wrote: > > Hi, > > hush aborts when doing mentioned parameter substitution. > (Fortunately it works fine when double-quoted.) > > $ ./hush > > > BusyBox v1.37.0.git (2023-06-04 12:42:18 CEST) hush - the humble shell > Enter

Re: [PATCH] udhcpd: Serve BOOTP clients

2023-06-12 Thread Denys Vlasenko
On Mon, May 29, 2023 at 3:39 AM Adam Goldman wrote: > This patch makes udhcpd respond correctly to queries from BOOTP clients. > > It contains the following changes: > > The end field, or DHCP_END option, is required in DHCP requests but > optional in BOOTP requests. Only complain about missing

Re: [PATCH 2/2] od: add tests

2023-05-25 Thread Denys Vlasenko
Applied, thank you On Thu, May 11, 2023 at 4:06 PM David Leonard wrote: > > On Fri, 12 May 2023, David Leonard wrote: > > * Added tests for od (non-DESKTOP little-endian) > > * Allow 'optional' to invert meaning of a config option with '!' > > Hmm, that patch seems to have been a bit mangled in

Re: Suspicious BUG in hush, while 'elif' has more commands than 1, only the first command is executed

2023-05-25 Thread Denys Vlasenko
Thanks for the report. Fixed in git. On Fri, May 19, 2023 at 9:07 AM vsfos wrote: > > Tested on wsl ubuntu 22.04 and linux orangepi5 by executing scripts below: > > #!/bin/sh > if false; then > : nothing > elif echo 'test-1'; echo 'test-2' ; echo 'test-3'; then > echo "abcdefg-1" > fi >

Re: [PATCH] ash: use-after-free in bash pattern substitution (resubmit)

2023-05-18 Thread Denys Vlasenko
Applied, thank you. On Mon, May 15, 2023 at 7:26 AM Karsten Sperling wrote: > > Hi, just bumping this thread one last time. > > Please let me know if there is some contribution guideline I’m not following > correctly, or if there is some other reason for not accepting this patch. > > Cheers,

Re: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries

2023-05-10 Thread Denys Vlasenko
On Tue, May 9, 2023 at 7:48 PM Rich Felker wrote: > On Tue, May 09, 2023 at 07:33:40PM +0200, Denys Vlasenko wrote: > > On Sat, Oct 8, 2022 at 7:23 PM Uwe Kleine-König > > wrote: > > > > > > The transaction IDs generated by res_mkquery() for both glibc a

Re: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries

2023-05-09 Thread Denys Vlasenko
On Sat, Oct 8, 2022 at 7:23 PM Uwe Kleine-König wrote: > > The transaction IDs generated by res_mkquery() for both glibc and musl only > depends on the state of the monotonic clock. Hmm... did you report this to them? ___ busybox mailing list

Re: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries

2023-05-09 Thread Denys Vlasenko
Applied, thank you. On Sat, Oct 8, 2022 at 7:23 PM Uwe Kleine-König wrote: > > The transaction IDs generated by res_mkquery() for both glibc and musl only > depends on the state of the monotonic clock. > For some machines (here: a TP-Link RE200 powered by a MediaTek MT7620A) > the monotonic

Re: [PATCH] build system: Make it possible to build with 64bit time_t

2023-05-07 Thread Denys Vlasenko
Applied, thank you! On Thu, Apr 20, 2023 at 2:13 PM Uwe Kleine-König wrote: > > From: Uwe Kleine-König > > On most 32bit architectures time_t (and a few other time related types) > are a signed 32bit wide integer type. > As a consequence they can only represent dates between > > Fri Dec

Re: [PATCH v5] readlink: more size optimization

2023-05-07 Thread Denys Vlasenko
> + > + fputs_stdout(buf); > + if (!(opt & 1)) > + bb_putchar('\n'); Let's not tempt libc to split the write into two syscalls. Applied, thank you ___ busybox mailing list busybox@busybox.net

Re: Busybox modprobe brings error "Invalid ELF header magic: !=ELF"

2023-05-02 Thread Denys Vlasenko
On Mon, May 1, 2023 at 4:25 PM Jeff Pohlmeyer wrote: > On Fri, Apr 28, 2023 at 9:19 AM Jeff Pohlmeyer wrote: > > On Fri, Mar 31, 2023 at 6:20 AM Denys Vlasenko wrote: > > > > Kernel does not auto-detect compressed modules. > > > We need to call finit_module() with MO

Re: [PATCH] readlink: Support --, -n always

2023-04-16 Thread Denys Vlasenko
Applied, thank you On Mon, Apr 10, 2023 at 4:00 PM Eric Blake wrote: > > Ping > > On Fri, Mar 24, 2023 at 09:58:14AM -0500, Eric Blake wrote: > > POSIX will be standardizing readlink (just the -n option) and realpath > > (just -E and -e options): > >

Re: [PATCH] tr: display usage for incorrect arguments

2023-04-16 Thread Denys Vlasenko
Applied, thank you. On Sun, Apr 16, 2023 at 9:24 AM Ron Yorston wrote: > > tr must have one or two non-option arguments. Display the usage > message if any other number is present. > > function old new delta > .rodata

Re: [PATCH 1/1] ash,hush: tab completion of functions and aliases

2023-04-16 Thread Denys Vlasenko
Applied, thank you. On Thu, Apr 13, 2023 at 1:56 PM Ron Yorston wrote: > > Since commit 9e2a5668f (ash,hush: allow builtins to be tab-completed, > closes 7532) ash and hush have supported tab completion of builtins. > > Other shells, bash and ksh for example, also support tab completion > of

Re: [PATCH] lineedit: fix crash when icanon set with -echo

2023-04-12 Thread Denys Vlasenko
Applied, thank you. On Mon, Apr 3, 2023 at 10:53 PM Akos Somfai wrote: > > When icanon is set with -echo (e.g. ssh from an emacs shell) then > S.state will remain null but later it will be deferenced causing ash to > crash. Fix: additional check on state. > --- > libbb/lineedit.c | 4 ++-- > 1

Re: sleep as an ash builtin

2023-04-12 Thread Denys Vlasenko
Indeed. Fixed. On Mon, Apr 10, 2023 at 6:11 PM Ron Yorston wrote: > > Denys Vlasenko wrote: > >Fixed. Please try current git. > > Thanks, Denys. Works now. > > But... > >/* Without this, bare "sleep" in ash shows _ash_ --help */ >i

Re: busybox seq doesn't handle negative numbers

2023-04-11 Thread Denys Vlasenko
On Mon, Apr 10, 2023 at 6:34 PM Keith Thompson wrote: > On Mon, Apr 10, 2023 at 5:35 AM Denys Vlasenko > wrote: > > On Tue, Apr 4, 2023 at 7:16 AM Keith Thompson > > wrote: > > > The GNU coreutils seq command recognizes and handles negative > > > arguments.

Re: [PATCH] miscutil: provide getrandom() userland implementation if needed

2023-04-10 Thread Denys Vlasenko
I put the fix in seedrng.c Let's avoid adding two source files just for this. On Fri, Feb 24, 2023 at 11:52 PM Markus Mayer wrote: > > Glibc 2.24 and older do not provide an interface for the getrandom() > system call. Linux kernels have been implementing this sytem call since > kernel 3.17. >

Re: [PATCH] appletlib: fix "warning: unused variable applet_no"

2023-04-10 Thread Denys Vlasenko
Applied, thank you. On Sun, Apr 9, 2023 at 10:19 AM Tomas Paukrt wrote: > > From 0d02a593c1ddeb7c4bb49b26524498a388ce0a0f Mon Sep 17 00:00:00 2001 > From: Tomas Paukrt > Date: Sun, 9 Apr 2023 08:57:46 +0200 > Subject: [PATCH] appletlib: fix "warning: unused variable applet_no" > >

Re: sleep as an ash builtin

2023-04-10 Thread Denys Vlasenko
Thank you for the report. Fixed. Please try current git. On Mon, Apr 3, 2023 at 10:34 PM Ron Yorston wrote: > > Another thing about sleep as an ash builtin: > >$ trap 'echo yo' INT >$ echo $EPOCHSECONDS; sleep 10; echo $EPOCHSECONDS >1680553805 >^C^C^C^C^Cyo >1680553815 >

Re: busybox seq doesn't handle negative numbers

2023-04-10 Thread Denys Vlasenko
On Tue, Apr 4, 2023 at 7:16 AM Keith Thompson wrote: > 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 name. Fixed, please try current git.

Re: [PATCH] ash: improve trap and jobs builtins in child shells

2023-03-31 Thread Denys Vlasenko
Applied, thank you. On Thu, Mar 30, 2023 at 12:05 PM Ron Yorston wrote: > > The trap and jobs builtins can be used to report information about > traps and jobs. This works when they're called from the current > shell but in a child shell the required information is usually > cleared. Special

Re: Busybox modprobe brings error "Invalid ELF header magic: !=ELF"

2023-03-31 Thread Denys Vlasenko
On Sat, Mar 18, 2023 at 11:35 AM Service IIT (Mayer EMI) wrote: > Am 18.03.2023 um 10:46 schrieb Norbert Lange: > > Hello, > > BusyBox first tries to pass the module the the kernel via filedescriptor, > this method only accepts uncompressed files. Yielding that error message. > > Only then it

Re: [PATCH] ash: make EPOCH variables work if RANDOM is disabled

2023-03-29 Thread Denys Vlasenko
Applied, thank you. On Sun, Mar 26, 2023 at 12:21 PM Ron Yorston wrote: > > Commit 1d37186fe2 (ash: add bash-compatible EPOCH variables) added > support for the EPOCHSECONDS and EPOCHREALTIME variables. > > These variables are dynamic and therefore require the VDYNAMIC flag > to be non-zero.

Re: [PATCH] lineedit: fix matching of directories when searching PATH

2023-03-29 Thread Denys Vlasenko
Applied, thank you. On Fri, Mar 24, 2023 at 4:25 PM Ron Yorston wrote: > > Commit 8baa643a3 (lineedit: match local directories when searching > PATH) included subdirectories of the current directory in the search > when tab-completing commands. > > Unfortunately a short time later commit

Re: sha256sum Illegal instruction on musl amd64

2023-03-29 Thread Denys Vlasenko
On Wed, Mar 29, 2023 at 3:07 PM Denys Vlasenko wrote: > On Wed, Mar 1, 2023 at 12:01 PM alice wrote: > > On Tue Feb 28, 2023 at 11:17 PM CET, wrote: > > > I'm having an intermittent issue with "BusyBox v1.36.0 (2023-01-03 > > > 22:49:12 > > > UTC)&quo

Re: sha256sum Illegal instruction on musl amd64

2023-03-29 Thread Denys Vlasenko
On Wed, Mar 1, 2023 at 12:01 PM alice wrote: > On Tue Feb 28, 2023 at 11:17 PM CET, wrote: > > I'm having an intermittent issue with "BusyBox v1.36.0 (2023-01-03 22:49:12 > > UTC)" (the one from the Docker image busybox:musl) when running on amd64 > > GitHub > > actions runner VMs (azure). > >

Re: [PATCH] httpd should accept trailing slash after PATH_INFO

2023-03-28 Thread Denys Vlasenko
Fixed in git (a bit differently). Thank you. On Tue, Mar 7, 2023 at 8:08 PM Andreas Mahling wrote: > > sorry, it seems I didn't follow the usual path for submitting a patch, > so here I go again: > > I stumbled upon a problem with the CGI-enabled httpd. It seems that > httpd can't handle a CGI

Re: [PATCH] find: implement -ok

2023-03-28 Thread Denys Vlasenko
On Sun, Jan 29, 2023 at 3:14 AM David Leonard wrote: > Resending patch for 'find -ok'. I re-ran bloatcheck (x86_64). findutils/find.c: In function ‘do_exec’: findutils/find.c:837:12: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 837 | return rc == 0; /*

Re: [PATCH] fixdep: avoid underflow when end of entry doesn't coincide with EOF

2023-02-27 Thread Denys Vlasenko
Applied, thank you. On Tue, Feb 21, 2023 at 8:24 PM Arsen Arsenović wrote: > > Bug: https://bugs.gentoo.org/893776 > Closes: https://bugs.busybox.net/show_bug.cgi?id=15326 > Signed-off-by: Arsen Arsenović > --- > Hi, > > This is a fix for the recently reported scandep-related build failure. >

Re: [PATCH] libiproute: fix filtering ip6 route by table id

2023-02-16 Thread Denys Vlasenko
On Sun, Feb 12, 2023 at 5:30 AM Yousong Zhou wrote: > > Otherwise > > - "ip -6 route show" shows routes from all tables > - "ip -6 route show table 200" shows nothing > > function old new delta > print_route

Re: Proposed fix for issue 15256

2023-01-26 Thread Denys Vlasenko
(1) This can race with other signals. (2) This allows SIGWINCH to "erase" a concurrently arriving signal. I am trying to fix this instead by ignoring signals (poll returning EINTR) which do *not* set bb_got_signal. (This needs a bit of surgery in hush to not set it on SIGCHLD). Please try

Re: The busybox website is unbearably slow

2023-01-19 Thread Denys Vlasenko
On Wed, Jan 18, 2023 at 5:45 PM Peter Korsgaard wrote: > > "Xabier" == Xabier Oneca <-- xOneca > writes: > Hi, > > > Yes, I see the same in git.busybox.net since a while back. I thought it was > > my browser's fault (because it sticks in "performing TLS handshake"), but > > now tried with

Re: [PATCH v2] ntpd: make NTP client and server Y2036/2038-ready

2023-01-17 Thread Denys Vlasenko
On Tue, Jan 17, 2023 at 4:47 PM Denys Vlasenko wrote: > Apologies for a very late reply. > > On Fri, Sep 16, 2022 at 3:07 PM Miroslav Lichvar wrote: > > The 32-bit integer part of the NTP timestamp overflows in year 2036, > > which starts the second NTP era. > > &g

Re: [PATCH v2] ntpd: make NTP client and server Y2036/2038-ready

2023-01-17 Thread Denys Vlasenko
Apologies for a very late reply. On Fri, Sep 16, 2022 at 3:07 PM Miroslav Lichvar wrote: > The 32-bit integer part of the NTP timestamp overflows in year 2036, > which starts the second NTP era. > + /* Shift timestamps before 1970 to the second NTP era (2036-2106) */ > + if

Re: [PATCH] ed: don't use memcpy with overlapping memory regions

2023-01-05 Thread Denys Vlasenko
Applied, thank you On Thu, Dec 22, 2022 at 3:30 PM Sören Tempel wrote: > > PING. > > Any love for good old ed(1)? > > Sören Tempel wrote: > > Pinging again as this is still unfixed and the proposed fix is rather > > trivial. > > > > Sören Tempel wrote: > > > Ping. > > > > > >

Re: udhcpc6 missing source address

2022-12-14 Thread Denys Vlasenko
On Wed, Dec 14, 2022 at 11:23 PM David Laight wrote: > From: Denys Vlasenko > > Sent: 14 December 2022 21:17 > A Linux system that runs the dhcp client never reports any > received ethernet packets as 'discarded by software' because > they all get passed to dhcp! > (At le

Re: udhcpc6 missing source address

2022-12-14 Thread Denys Vlasenko
On Wed, Dec 14, 2022 at 8:59 PM John Lemonovich wrote: > Thank you all for the replies so far. I am admittedly an FPGA > designer/hardware guy, and an embedded software/networking person only enough > to be able to get the hardware working  > > > Here is a the wireshark (via tcpdump) of the

Re: [PATCH] more: accept and ignore -e

2022-12-14 Thread Denys Vlasenko
Applied, thank you. On Mon, Nov 21, 2022 at 2:20 PM Natanael Copa wrote: > > Accept and ignore -e which is specified in POSIX. > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html > --- > util-linux/more.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff

Re: udhcpc6 missing source address

2022-12-14 Thread Denys Vlasenko
On Wed, Dec 14, 2022 at 10:52 AM David Laight wrote: > > From: John Lemonovich > > Sent: 13 December 2022 20:35 > > > > How are you getting a solicit message through with :: as the source > > address, which I've found no > > server likes as I've tested 3 of them? Or is mine not using the link

Re: udhcpc6 missing source address

2022-12-14 Thread Denys Vlasenko
On Wed, Dec 14, 2022 at 8:55 AM Nicolas Cavallari wrote: > > On 14/12/2022 00:47, Denys Vlasenko wrote: > > On Tue, Dec 13, 2022 at 4:58 PM John Lemonovich > > wrote: > >> > >> Thanks for the replies. Yes David, it's also my understanding per the > >&g

Re: udhcpc6 missing source address

2022-12-13 Thread Denys Vlasenko
On Tue, Dec 13, 2022 at 4:58 PM John Lemonovich wrote: > > Thanks for the replies. Yes David, it's also my understanding per the spec, > that the client's link-local address must be included for the solicit message. Where does it say that in https://www.rfc-editor.org/rfc/rfc3315 ? > The

Re: udhcpc6 missing source address

2022-12-13 Thread Denys Vlasenko
On Fri, Dec 9, 2022 at 5:09 PM John Lemonovich wrote: > Hello Denys, > > I am working on an embedded Linux project using an intel Arria 10 FPGA and > have been using IPv4 for a long time, and now need IPv6. I found your email > online searching for help. I have many things working with IPv6,

Re: [PATCH v4 9/9] loop: Add LOOP_CONFIGURE ioctl

2022-12-13 Thread Denys Vlasenko
> +config LOOP_CONFIGURE > + bool "always uses LOOP_CONFIGURE, kernel version >= 5.8" > + > +config NO_LOOP_CONFIGURE > + bool "never uses LOOP_CONFIGURE, kernel version < 5.8" > + > +config TRY_LOOP_CONFIGURE > + bool "try LOOP_CONFIGURE, kernel version is unknown" The

Re: [PATCH v4 3/9] loop:refactor: del close_and_try_next_loopN

2022-12-12 Thread Denys Vlasenko
On Mon, Nov 21, 2022 at 2:57 PM Xiaoming Ni wrote: > > Step 3 of micro-refactoring the set_loop() function: > Delete close_and_try_next_loopN. > > (add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes > > Signed-off-by: Xiaoming Ni > --- > libbb/loop.c | 6

Re: [PATCH v4 2/9] loop:refactor: extract subfunction get_next_free_loop()

2022-12-12 Thread Denys Vlasenko
Applied with some changes, thank you On Mon, Nov 21, 2022 at 2:58 PM Xiaoming Ni wrote: > > Step 2 of micro-refactoring the set_loop function () > Extract subfunction get_next_free_loop() from set_loop() > > Also fix miss free(try) when stat(try) and mknod fail > > function

Re: [PATCH v4 1/9] loop:refactor: extract subfunction open_file()

2022-12-12 Thread Denys Vlasenko
On Mon, Nov 21, 2022 at 2:58 PM Xiaoming Ni wrote: > +static int open_file(const char *file, unsigned flags, int *mode) > +{ > + int ffd; > + /* open the file. barf if this doesn't work. */ > + *mode = (flags & BB_LO_FLAGS_READ_ONLY) ? O_RDONLY : O_RDWR; > + retry_open_ffd: >

Re: [PATCH 1/1] xxd: fix typo in trivial usage

2022-12-08 Thread Denys Vlasenko
Applied, thank you On Fri, Dec 2, 2022 at 4:54 PM Brandon Maier wrote: > > Signed-off-by: Brandon Maier > --- > util-linux/hexdump_xxd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c > index 6629407de..45391b565

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

2022-11-29 Thread Denys Vlasenko
On Tue, Oct 25, 2022 at 10:56 PM samuel ammonius wrote: > Hello, > > I have a simple ISO filesystem set up with busybox and grub.These are the > commands I use in GRUB2 to start the system: > > grub> set root=(cd) > grub> linux /boot/bzImage root=/dev/sda1 > grub> initrd /boot/initrd > grub>

Re: [PATCH] unzip -l: add missed big-endian conversions date and time

2022-11-29 Thread Denys Vlasenko
Applied, thank you On Tue, Oct 25, 2022 at 1:57 PM Peter Kaestle wrote: > > When calling unzip -l the date and time output was missing big-endian > conversions. > > Signed-off-by: Peter Kästle > --- > archival/unzip.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/archival/unzip.c

Re: [PATCH] Fix non-Linux builds

2022-11-29 Thread Denys Vlasenko
applied, thank you. On Sun, Oct 16, 2022 at 2:05 AM Samuel Thibault wrote: > > Various tools are Linuxish and should thus only attempted to build on > Linux only. Some features are also Linux-only. > > Also, libresolv is used on all GNU platforms, notably GNU/Hurd and > GNU/kfreeBSD. > > diff

Re: [PATCH] loop: fix a race when a free loop device is snatched

2022-11-16 Thread Denys Vlasenko
Applied, thank you On Fri, Oct 21, 2022 at 8:58 AM Xiaoming Ni wrote: > > When /dev/loop-control exists and *device is empty, the mounting fails > due to concurrent contention. > Code Execution Flow: > try = xasprintf(LOOP_FORMAT, i); > for (i = 0; i <= 0xf; i++) { // The

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

2022-09-05 Thread Denys Vlasenko
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 between some > Ukrainians, and Russia. I believe solely

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

2022-09-05 Thread Denys Vlasenko
On Mon, Sep 5, 2022 at 2:46 PM Steffen Nurpmeso wrote: > > 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

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

2022-09-05 Thread Denys Vlasenko
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 basic things, as per POSIX, which is two ste

Re: [PATCH] libbbb: mark stack in assembly files read-only

2022-08-30 Thread Denys Vlasenko
Applied, thanks On Thu, Aug 25, 2022 at 12:48 PM Ludwig Nussel wrote: > > Signed-off-by: Ludwig Nussel > --- > libbb/hash_md5_sha256_x86-32_shaNI.S | 3 +++ > libbb/hash_md5_sha256_x86-64_shaNI.S | 3 +++ > libbb/hash_md5_sha_x86-32_shaNI.S| 3 +++ > libbb/hash_md5_sha_x86-64.S |

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

2022-08-30 Thread Denys Vlasenko
Your patches seem to be against dash, not busybox git tree? On Thu, Aug 11, 2022 at 6:16 PM Steffen Nurpmeso wrote: > > > --- > 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

Re: Subject: [PATCH] ash: make 'sleep' a builtin

2022-08-30 Thread Denys Vlasenko
On Tue, Aug 30, 2022 at 10:10 AM David Laight wrote: > > One question is why? > > Shell builtins (mostly) exist to speed things up. > > But sleep doesn’t need speeding up. Avoiding having another, possibly long-living process ___ busybox mailing list

Re: [PATCH] libbb: make '--help' handling more consistent

2022-08-30 Thread Denys Vlasenko
equired to just check that the string --help is not empty. > > On 22/08/2022 13:07, Denys Vlasenko wrote: > > Applied, thank you > > > > On Sun, May 1, 2022 at 10:46 AM Ron Yorston wrote: > >> > >> Running an applet with '--help' as its only argument is

Re: Subject: [PATCH] ash: make 'sleep' a builtin

2022-08-27 Thread Denys Vlasenko
You forgot this: //kbuild:lib-$(CONFIG_SLEEP) += sleep.o +//kbuild:lib-$(CONFIG_ASH_SLEEP) += sleep.o /* BB_AUDIT SUSv3 compliant */ /* BB_AUDIT GNU issues -- fancy version matches except args must be ints. */ diff --git a/include/libbb.h b/include/libbb.h index abbc9ac59..129858e27 100644

Re: [PATCH] devmem: add 128-bit width

2022-08-26 Thread Denys Vlasenko
On Thu, Aug 25, 2022 at 5:55 PM Aaro Koskinen wrote: > > From: Aaro Koskinen > > Add 128-bit width if the compiler provides the needed type. > > function old new delta > devmem_main 412 517+105 >

Re: [PATCH] libbb: make '--help' handling more consistent

2022-08-22 Thread Denys Vlasenko
Applied, thank you On Sun, May 1, 2022 at 10:46 AM Ron Yorston wrote: > > Running an applet with '--help' as its only argument is treated > as a special case. If additional arguments follow '--help' the > behaviour is inconsistent: > > - applets which call single_argv() print help and do

Re: [PATCH] ash: fix use-after-free in bash pattern substitution

2022-08-02 Thread Denys Vlasenko
Applied, thank you. On Tue, Aug 2, 2022 at 5:58 PM Sören Tempel wrote: > > PING again :) > > Sören Tempel wrote: > > PING. > > > > This has been applied at Alpine Linux downstream for the past few months > > and we didn't encounter into any issues with this particular patch so far. > > > >

Re: udhcpc6 kernel listen mode is broken

2022-08-02 Thread Denys Vlasenko
Fixed, thank you. Can you try current git? On Sat, Jun 4, 2022 at 2:58 AM Danomi Manchego wrote: > > Sorry all, I did not realize that there was a function called > d6_listen_socket() in d6_socket.c - so no new function is needed to > fix DHCPv6 Renew reply processing. The correct message ID is

Re: [PATCH] vi: add 'ZQ' quitting command

2022-08-02 Thread Denys Vlasenko
Applied, thank you On Wed, Jun 8, 2022 at 9:52 PM Grob Grobmann wrote: > > Busybox vi provides the 'ZZ' command to save and close > the similar 'ZQ' command just exits without saving > I propose this small patch to add that command. > > diff --git a/editors/vi.c b/editors/vi.c > index

Re: [PATCH] ping: fix typo

2022-08-02 Thread Denys Vlasenko
Applied, thank you On Mon, Aug 1, 2022 at 2:22 PM Henrique Rodrigues wrote: > > Hi, > > Please finx attached a patch that fixes two typos on networking/ping.c. > "recevied" should be "received". > > Thank you, > Henrique Rodrigues > ___ > busybox

Re: [PATCH v2] ash: Fix use-after-free on idx variable

2022-08-02 Thread Denys Vlasenko
Applied, thank you. On Wed, Jun 1, 2022 at 4:18 PM wrote: > > From: Sören Tempel > > Consider the following code from ash.c: > > STPUTC(*idx, expdest); > if (quotes && (unsigned char)*idx == CTLESC) { > > The idx variable points to a value in the stack string (as managed > by

Re: [PATCHv3]ash: Add ifsfree to varunset and varvalue function to fix a buffer over-read

2022-08-02 Thread Denys Vlasenko
Applied, thank you! On Mon, Jun 20, 2022 at 8:23 PM Alex Gorinson wrote: > > Due to a logic error in the ifsbreakup function in ash.c when a > heredoc and normal command is run one after the other by means of a > semi-colon, when the second command drops into ifsbreakup the command > will be

Re: sort's -k flag is buggy when M is also passed

2022-07-29 Thread Denys Vlasenko
Fixed in git. Thank you. On Wed, Jun 29, 2022 at 7:11 AM Dennis Chen wrote: > > All commands were run on both Ubuntu busybox v1.30.1 and Alpine busybox > v1.35.0. > > I ran > echo "3 March\n2 April" | busybox sort -k 2,2M > and it returned > 2 April > 3 March > It should

  1   2   3   4   5   6   7   8   9   10   >