From 8abb4738f8a660b9f8afa1f480303e43a81d60b4 Mon Sep 17 00:00:00 2001 From: hn06511 Date: Thu, 7 Jun 2018 10:44:50 -0700 Subject: [PATCH] Fixed .logout --- rc/bash_login | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/bash_login b/rc/bash_login index 8207eae..d390e56 100644 --- a/rc/bash_login +++ b/rc/bash_login @@ -121,8 +121,11 @@ if [ -r /etc/bash_completion -a $ARCHITECTURE != "cygwin" ]; then source /etc/bash_completion fi -if [ -x ~/.rc/logout ]; then - trap "~/.rc/logout" 0 +# We specify /home/$USER here so that when we sudo to another user +# we will only trap logout if that user also has a ~/.rc/logout +# (doubtfull). +if [ -x /home/$USER/.rc/logout ]; then + trap "/home/$USER/.rc/logout" 0 fi # ClearCase Stuff -- 2.17.1