File git-04-b66cf03e673e84902ce0330f88f84f4fbdc8c9e9.patch of Package aaa_base.17502
commit b66cf03e673e84902ce0330f88f84f4fbdc8c9e9
Author: Werner Fink <werner@suse.de>
Date: Wed Jan 9 11:25:34 2019 +0100
Restore old position of ssh/sudo source of profile
for bug bsc#1118364 but hopefully do not reintroduce bug boo#1088524
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index b779297..07ac4a4 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -334,6 +334,20 @@ if test -r /etc/profile.d/vte.sh -a ! -k /etc/profile.d/vte.sh; then
. /etc/profile.d/vte.sh
fi
+if test "$_is_save" = "unset" ; then
+ #
+ # Just in case the user excutes a command with ssh or sudo
+ #
+ if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" -a "$noprofile" != true ; then
+ _is_save="$is"
+ _SOURCED_FOR_SSH=true
+ . /etc/profile > /dev/null 2>&1
+ unset _SOURCED_FOR_SSH
+ is="$_is_save"
+ _is_save=unset
+ fi
+fi
+
#
# Set GPG_TTY for curses pinentry
# (see man gpg-agent and bnc#619295)
@@ -356,14 +370,6 @@ esac
test -s /etc/sh.shrc.local && . /etc/sh.shrc.local
if test "$_is_save" = "unset" ; then
- #
- # Just in case the user excutes a command with ssh or sudo
- #
- if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" -a "$noprofile" != true ; then
- _SOURCED_FOR_SSH=true
- . /etc/profile > /dev/null 2>&1
- unset _SOURCED_FOR_SSH
- fi
unset is _is_save
fi