Comment 7 for bug 1131383

Revision history for this message
Daniel Richard G. (skunk) wrote :

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.