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

bugzilla at redhat.com bugzilla at redhat.com
Thu Aug 24 11:33:09 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1425325



--- Comment #3 from Anoop C S <anoopcs at redhat.com> ---
(In reply to Richard W.M. Jones from comment #2)
> Of course not.
> 
> Simply starting a new shell shows that $TOP is defined:
> 
> $ echo $TOP 
> 0

Ok.

So these bash completion scripts are being sourced and is available at launch
of each session. It's the case that some other bash completion script are also
leaking variables to outside world. Every session launch sources bash
completion scripts from /etc/bash_completion.d/ via
/usr/share/bash-completion/bash_completion[1] which in turn is sourced from
/etc/profile.d/bash_completion[2] profile script.

[1] https://github.com/scop/bash-completion/blob/master/bash_completion#L2070
[2]
https://github.com/scop/bash-completion/blob/master/bash_completion.sh.in#L11

So.. now to /etc/bash_completion.d/gluster, I guess we need to make all those
kind of global variables local to its completion script by rearranging the
whole logic.

-- 
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