Support ssh-agent socket update when reconnecting to an existing session

Bug #424522 reported by Mathias Gug
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Wishlist
Dustin Kirkland 
byobu (Ubuntu)
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

When reconnecting to an existing byobu session the ssh agent socket is not updated correctly.

See [1] for an fix:

http://stackoverflow.com/questions/674758/how-do-you-get-screen-to-automatically-connect-to-the-current-ssh-agent-when-re-a

Related branches

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, so to fix this we need to do two things...

We need the following in ~/.profile
  test $SSH_AUTH_SOCK && ln -sf "$SSH_AUTH_SOCK" "/tmp/ssh-agent-$USER-screen"

And we need the following in the byobu/screen configuration:
  setenv SSH_AUTH_SOCK "/tmp/ssh-agent-$USER-screen"

This is something I'm going to want to get a second opinion on, from someone on the security team before committing. At the very least, we can document this in Launchpad Answers if we can't solve it in byobu.

:-Dustin

Changed in byobu:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Kees Cook (kees) wrote :

This doesn't feel like it's byobu's problem to solve. But if a fix is incorporated, it should certainly not use a static file in tmp. I would recommend putting it somewhere in the user's home directory.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Kees-

I agree with your comments, on /tmp.

I have two other places in mind...

$HOME/.byobu
or
/var/run/screen/S-$USER

What do you think about these two?

:-Dustin

Revision history for this message
Kees Cook (kees) wrote :

Either should be fine as long as the directories are mode 0700

Changed in byobu (Ubuntu):
status: New → In Progress
Changed in byobu:
status: Triaged → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Wishlist
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: In Progress → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 2.33-0ubuntu1

---------------
byobu (2.33-0ubuntu1) karmic; urgency=low

  * cpu_count, disk, logo, network, reboot_required, release, temp_c,
    temp_f, updates_available, wifi: make byobu status scripts friendlier
    for busybox environments (tested on the Palm Pre), LP: #430096
  * bin/updates_available: print the current cache even if we're
    updating the cache, handle it more efficiently
  * po/byoub-*.po: rename to just *.po, fix translations location, LP: #430095
  * debian/postinst, debian/preinst: move symlink of screen-profiles-status ->
    byobu-status from the postinst to the preinst
  * byobu-janitor, byobu-launcher, profiles/common: establish and update an
    SSH_AUTH_SOCK link, on screen launch and reconnect, LP: #424522

 -- Dustin Kirkland <email address hidden> Thu, 17 Sep 2009 11:07:03 -0500

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.