Re: [PATCH] shell script error management in ash (set of 6 patches)

2021-08-25 Thread Roberto A. Foglietta
Il giorno mar 24 ago 2021 alle ore 23:42 Harald van Dijk ha scritto: > On 24/08/2021 11:10, Roberto A. Foglietta wrote: > > Thanks again for your insightfulness. > > > > I reverted back to the previous situation when I was resetting the > > recursive flag when the evaltree returns: > > > > - if

[PATCH 1/4] httpd and telnetd: Make default port configurable

2021-08-25 Thread Sergey Ponomarev
BusyBox on Termux can't use ports less than 1024 it's patched to change default port for httpd to 8080 and telnetd to 8023. https://github.com/termux/termux-packages/blob/master/packages/busybox/0011-networking-telnetd-default-port.patch https://github.com/termux/termux-packages/blob/master/packa

[PATCH 2/4] Revert 2aeb201 "libbb: new option FEATURE_ETC_SERVICES"

2021-08-25 Thread Sergey Ponomarev
Don't lookup /etc/services for well known ports. In the commit was added a new function bb_lookup_std_port(). The function is in fact not needed and we may assume that it is always disabled. Nobody changes ports in the /etc/services i.e. if we know a port it will always remain the same. The file

[PATCH 3/4] Don't use bb_lookup_port() for well known ports

2021-08-25 Thread Sergey Ponomarev
The bb_lookup_port() function may resolve port by its name. But for FTP or TFTP no any names are expected because they work only with one protocol. E.g. it doesn't make any sense to execute ftpget -P http. All other programs like traceroute are just use xatou16(). Note that the bb_lookup_port() is

[PATCH 4/4] bb_lookup_port(): return 0 if lookup failed

2021-08-25 Thread Sergey Ponomarev
Unlike xatou16() the bb_lookup_port() won't exit program if port parsing is failed. But it may return a default_port instead. This is not safe because user requested another port. Instead, we return 0 and caller may gracefully show a message or just pass it further. Since the default_port is alw