gp-saml-gui icon indicating copy to clipboard operation
gp-saml-gui copied to clipboard

Add 'GP_' prefix to environment variables

Open aclindsa opened this issue 6 years ago • 2 comments

This avoids a name collision with $HOST and $USER, which are overloaded in Linux/Unix environments.

aclindsa avatar Sep 17 '19 15:09 aclindsa

This avoids a name collision with $HOST and $USER, which are overloaded in Linux/Unix environments.

Good point. Though openconnect --authenticate (which I'm trying to emulate here) also emits the HOST variable, and I don't think anyone ever complains about that.

I actually don't think this should cause any problems, since it'd normally only be used in a shell script environment where the variables won't be exported to the user's interactive shell… am I overlooking something?

dlenski avatar Sep 17 '19 18:09 dlenski

Hmm, I wasn't aware you were emulating an existing interface. Is this script something you would expect folks to use as a drop-in replacement for openconnect --authenticate in existing setups, or is this more simply following a convention since something similar already existed?

It seems that the reason I noticed it when others have not is because I'm using zsh, which uses the $HOST variable to store the hostname (whereas bash uses $HOSTNAME), so it mucked with my shell prompt. I don't know whether setting it is actively harmful, but it seemed like it wouldn't hurt to avoid the unintentional collision, either. I can see setting $HOST and $USER over top of the preexisting values as being particularly annoying when using the -b option to background openconnect in a terminal window in which you wish to continue doing other work.

aclindsa avatar Sep 17 '19 20:09 aclindsa