usr/bin/byobu, usr/bin/byobu-janitor: ensure that the SSH_AUTH_SOCK

link is not circular, LP: #549091
This commit is contained in:
Dustin Kirkland 2010-03-30 00:52:27 -05:00
commit b7f49e9fd8
3 changed files with 4 additions and 3 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (2.66) unreleased; urgency=low
* UNRELEASED
* usr/bin/byobu, usr/bin/byobu-janitor: ensure that the SSH_AUTH_SOCK
link is not circular, LP: #549091
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 16 Mar 2010 23:27:30 -0500

View file

@ -45,7 +45,7 @@ grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="mot
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors) -eq 256 ] && SCREEN_TERM="-T screen-256color"
# Create or update ssh-agent socket
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
rm -f "$RUN/$PKG.ssh-agent"
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
fi

View file

@ -35,7 +35,7 @@ DEFAULT_PROFILE="light"
PROFILE="$HOME/.$PKG/profile"
# Establish ssh-agent socket, helps when reconnecting to a detached session
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
rm -f "$RUN/$PKG.ssh-agent"
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
fi