Re: Ash glob symlink regression when using libc glob

2017-10-31 Thread Lauri Kasanen
On Mon, 30 Oct 2017 20:24:08 +0100 Denys Vlasenko wrote: > On Sun, Oct 29, 2017 at 7:43 PM, Lauri Kasanen wrote: > > Hi, > > > > It was reported the following case fails with bb 1.27.2: > > > > ln -s nonexistent mylink > > mv myli* someother > > > > It also fails with master. I bisected it to >

Re: Ash glob symlink regression when using libc glob

2017-10-31 Thread Denys Vlasenko
On Tue, Oct 31, 2017 at 8:31 AM, Lauri Kasanen wrote: > On Mon, 30 Oct 2017 20:24:08 +0100 > Denys Vlasenko wrote: > >> On Sun, Oct 29, 2017 at 7:43 PM, Lauri Kasanen wrote: >> > Hi, >> > >> > It was reported the following case fails with bb 1.27.2: >> > >> > ln -s nonexistent mylink >> > mv myl

Re: Ash glob symlink regression when using libc glob

2017-10-31 Thread Lauri Kasanen
On Tue, 31 Oct 2017 13:34:48 +0100 Denys Vlasenko wrote: > > It fails with glibc 2.24 and 2.7, x86 and x86_64, so probably everything > > between. Are you on a more recent glibc? > > $ /lib64/libc.so.6 > GNU C Library (GNU libc) development release version 2.26.9000. This looks relevant: http:/

Re: Ash glob symlink regression when using libc glob

2017-10-31 Thread Kang-Che Sung
On Tue, Oct 31, 2017 at 8:48 PM, Lauri Kasanen wrote: > > So it was fixed after 2.26 and no released glibc contains the fix. How > about either editing the description to say glibc >= 2.27 only, or even > checking that compile-time? I would like to have both. And probably give a preprocessor warn

Re: [PATCH 6/7] grep: Skip grepping symlinks to directories

2017-10-31 Thread Denys Vlasenko
Applied, thanks On Sat, Oct 7, 2017 at 7:53 PM, James Clarke wrote: > When grep is passed -r, recursive_action will treat any symlinks to > directories not in the root as normal files, since it lstat's them and > is therefore told they are not directories. However, file_action_grep > will still t

Re: [PATCH 7/7] libbb.h: Handle missing HOST_NAME_MAX; ensure MAXFOOLEN agrees with FOO_MAX

2017-10-31 Thread Denys Vlasenko
How about this? --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -709,6 +709,9 @@ packet_ok(int read_len, len_and_sockaddr *from_lsa, # if ENABLE_FEATURE_TRACEROUTE_VERBOSE if (verbose) { +# ifndef MAXHOSTNAMELEN +# define MAXHOSTNAMELEN 80 +# endif unsi

Re: [PATCH 7/7] libbb.h: Handle missing HOST_NAME_MAX; ensure MAXFOOLEN agrees with FOO_MAX

2017-10-31 Thread James Clarke
On 31 Oct 2017, at 15:06, Denys Vlasenko wrote: > > How about this? > > --- a/networking/traceroute.c > +++ b/networking/traceroute.c > @@ -709,6 +709,9 @@ packet_ok(int read_len, len_and_sockaddr *from_lsa, > > # if ENABLE_FEATURE_TRACEROUTE_VERBOSE >if (verbose) { > +# ifndef MAXHOST

NOEXEC environment bug

2017-10-31 Thread Jack Schmidt
I believe I have found a bug in the current version of busybox. When: * an applet is marked NOEXEC, * busybox is configured with CONFIG_FEATURE_SH_STANDALONE=y, and * busybox's ash is asked to do "ENV_VAR=newval no_exec_app" Then the no_exec app is not called with the new environment. This affec

[PATCH] inetd as unprivileged user

2017-10-31 Thread Jack Schmidt
When I tried to use inetd as an unprivileged user on linux (4.9.x, x86_64, glibc or musl), I get: inetd: can't set groups: Operation not permitted I believe the problem is line 1486, where it compares the desired uid to 0, rather than to the current uid, to decide whether to set groups. For ex