File git-33-04c9daea971d58248c64076d41315129a7083629.patch of Package aaa_base.7432
From 04c9daea971d58248c64076d41315129a7083629 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Mon, 9 Apr 2018 09:49:30 +0200
Subject: [PATCH] In bash.bashrc move ssh/sudo source of profile to avoid
removing
the `is' variable before last use (boo#1088524). Avoid the shell
code checker stumble over `function' keys word in ls.bash (git#54).
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/bash.bashrc | 18 +++++++++---------
files/etc/profile.d/ls.bash | 3 ++-
2 files changed, 11 insertions(+), 10 deletions(-)
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc 2018-05-14 14:51:01.769428558 +0000
@@ -321,15 +321,6 @@ if test -r /etc/profile.d/vte.sh -a ! -k
fi
#
-# Just in case the user excutes a command with ssh or sudo
-#
-if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" ; then
- _SOURCED_FOR_SSH=true
- . /etc/profile > /dev/null 2>&1
- unset _SOURCED_FOR_SSH
-fi
-
-#
# Set GPG_TTY for curses pinentry
# (see man gpg-agent and bnc#619295)
#
@@ -349,7 +340,16 @@ zsh) test -s /etc/zsh.zshrc.local &&
ash) test -s /etc/ash.ashrc.local && . /etc/ash.ashrc.local
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
--- a/files/etc/profile.d/ls.bash
+++ b/files/etc/profile.d/ls.bash 2018-05-14 14:50:38.377838505 +0000
@@ -56,7 +56,8 @@ case "$-" in
test -s /etc/profile.d/ls.zsh && . /etc/profile.d/ls.zsh
;;
ksh)
- function _ls {
+ function _ls
+ {
typeset IFS=' '
command -p ls $LS_OPTIONS ${1+"$@"}
}