1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 16:18:00 +00:00

Update ssh module for multi session hosts

create ssh_agent_env with current user id in file name to avoid collisions with other users
create ssh_agent_sock with current user id in file name to avoid collisions with other users
This commit is contained in:
Mathieu Chataigner 2016-03-08 17:14:47 +01:00 committed by Kaleb Elwert
parent f15557159a
commit 876f426581

View File

@ -14,10 +14,10 @@ fi
_ssh_dir="$HOME/.ssh"
# Set the path to the environment file if not set by another module.
_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}"
_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env.$UID}"
# Set the path to the persistent authentication socket.
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock.$UID"
# Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then