Secured .sshrc sourcing.
SOURCE_PROFILE and SOURCE_BASHRC are used to enable sourcing of .bashrc and .profile. This is due to an alternative way to source .sshrc from .bashrc, an infinite loop must be avoided if using 's' alias with sourcing .sshrc.
This commit is contained in:
parent
fc4d11d502
commit
2728eb2c95
@ -1,10 +1,10 @@
|
||||
#
|
||||
# sshrc will be called byaliased ssh command 's'.
|
||||
#
|
||||
if [ -f $HOME/.profile ]; then
|
||||
if [ -f $HOME/.profile ] && [ "$SOURCE_PROFILE" = "true" ]; then
|
||||
source $HOME/.profile
|
||||
fi
|
||||
if [ -f $HOME/.bashrc ]; then
|
||||
if [ -f $HOME/.bashrc ] && [ "$SOURCE_BASHRC" = "true" ]; then
|
||||
source $HOME/.bashrc
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user