Problem with HISTFILE

Denys Vlasenko vda.linux at googlemail.com
Thu Jan 7 08:13:19 UTC 2021


Fixed by this?

commit 3f8ec00b0c54790283cfec675716ef4b8e00bd8a
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Sun Jan 3 10:55:39 2021 +0100

    ash: make a strdup copy of $HISTFILE for line editing

On Thu, Jan 7, 2021 at 9:11 AM Olivier JAVAUX <olivier at javaux.online> wrote:
>
>
> Hello,
>
> When I try to setup a HISTFILE to something different from /root/.ash_xxxx it creates a weird file under / which is the history file.
>
> For instance, easy to reproduce:
>
> $ docker run -it --rm busybox sh
> / # busybox --help | grep ^BusyBox
> BusyBox v1.33.0 (2020-12-29 22:13:53 UTC) multi-call binary.
> BusyBox is copyrighted by many authors between 1998-2015.
> / # ls
> bin   dev   etc   home  proc  root  sys   tmp   usr   var
> / # HISTFILE=/tmp/foo
> / # ls
> bin   dev   etc   home  proc  root  sys   tmp   usr   var   w??
> / # cat w*
> ls
> / #
>
>
> In fact I tried to disable history by setting HISTFILE=/dev/null and noticed this behavior (it was in a alpine image which is using
> busybox ash as shell script).
> I have checked the source file but did not see obvious problem.
>
> Thanks for your support.
>
> Kind regards.
>
>      Olivier
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list