bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sourcing a script from a pipe is not reliable


From: Jeremy
Subject: Re: Sourcing a script from a pipe is not reliable
Date: Thu, 10 Jan 2019 11:52:05 -0800

On Thu, Jan 10, 2019 at 11:38 AM Chet Ramey <address@hidden> wrote:

> On 1/10/19 2:36 PM, Jeremy wrote:
> > Agreed there is no likelihood of a patch to 3.2. However, this version of
> > bash still has a significant presence in the wild and this bug is
> breaking
> > an installation script, so I am looking for a POSIX-compliant (and works
> > under Cygwin) alternative that avoids this bug so the script can be
> > modified.
>
> Have you tried a newer version of bash?
>
>
This bug seems not to be in current versions of bash 4.x, but I have not
made an exhaustive study. The thing is I do not have control over which
versions of bash people use to run the script, so I need a workaround. I
was hoping this was a known bug with a known cause and a known workaround
that would continue to be very portable. Alternatively, if we can narrow
down which versions of bash are affected, then we can consider doing a
specific check for that.

So far we have been able to limit this script to read operations so that it
can run unprivileged on a read-only file system as it is read from a
stream. That is why we are generating the script inline like this, and why
I am not happy with the obvious workaround of sourcing a file instead of
/dev/stdin.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]