[Bugs] [Bug 1425326] gluster bash completion leaks TOP=0 into the environment

bugzilla at redhat.com bugzilla at redhat.com
Tue Aug 21 14:14:07 UTC 2018


Worker Ant <bugzilla-bot at gluster.org> changed:

           What    |Removed                     |Added
             Status|POST                        |MODIFIED

--- Comment #7 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/20752 committed in release-4.1 by
"Shyamsundar Ranganathan" <srangana at redhat.com> with a commit message- Bash
integration script should namespace variables

In the original submitted script, it looks like there was effort
put into namespacing all global variables. However a few mistakes

referenced. This was likely an unrecognized defect in the
original code submission? These are now corrected to refer to

FINAL_LIST, LIST, and TOP were leaked into all Bash shells and
used by the command completion functions. The most problematic
of these was TOP, which was declared with "-i" making it an
integer. This cause other code which used TOP to define a path
to fail like this:

    $ bash
    $ TOP=/abc
    bash: /abc: syntax error: operand expected (error token is "/abc")

These are now qualified as GLUSTER_FINAL_LIST, GLUSTER_LIST, and
GLUSTER_TOP to reduce impact on scripts that might choose to use
these extremely common variable names.

> Change-Id: Ic96eda8efd1f3238bbade6c6ddb69118e8d82158
> Signed-off-by: Mark Mielke <mark.mielke at gmail.com>

(cherry picked from commit 89545e745e4075845c18078be67a31dea93a4e88)

Change-Id: Ic96eda8efd1f3238bbade6c6ddb69118e8d82158
Fixes: bz#1425326
Signed-off-by: Mark Mielke <mark.mielke at gmail.com>

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list