Christopher: thanks.

Upstream patching isn't really applicable here, because the script in
question is distribution-specific session-setup code.

As for demo code, here's a tidbit to get the ball rolling:

    if [ -n "$XDG_RUNTIME_DIR" -a -d "$XDG_RUNTIME_DIR" ]; then
      SSHAGENTARGS+="-a $XDG_RUNTIME_DIR/ssh-agent.$$"
    fi

(added right after the "SSHAGENTARGS=-1" conditional)

A couple advantages of this are

1. Old agent sockets are less likely to stick around, because /run/ is a
tmpfs;

2. Searching for my own ssh-agent socket(s) is easier/safer, because I
don't have to worry about /tmp/ssh-*/ directories that belong to someone
else, or (worse) a hostile attacker.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xorg in Ubuntu.
https://bugs.launchpad.net/bugs/1131383

Title:
  Wishlist: $SSH_AUTH_SOCK in $XDG_RUNTIME_DIR

Status in “xorg” package in Ubuntu:
  Triaged

Bug description:
  This is a wishlist item for openssh-client 6.0p1-3ubuntu1 in Ubuntu
  Quantal.

  Now that XDG_RUNTIME_DIR support is available, it would be nice if the
  /etc/X11/Xsession.d/90x11-common_ssh-agent X session startup script
  would check to see if the variable is set, and if so, pass an argument
  to ssh-agent(1) so that the Unix-domain socket is created in
  /run/user/$USER/* rather than /tmp/ssh-*/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1131383/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to