From eace590260ed6f0aab3f1052c23d8724e6e9a5df Mon Sep 17 00:00:00 2001 From: James McGlashan Date: Thu, 1 Dec 2011 20:57:27 +1100 Subject: [PATCH] made things safer, VERY bad outcome if it runs with an error, chmod $HOME 600 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 3c911dfe3..0db85a888 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -27,6 +27,7 @@ function _plugin__start_agent() # start ssh-agent and setup environment /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${_plugin__ssh_env} + [[ ! -f ${_plugin__ssh_env} ]] && return 1 chmod 600 ${_plugin__ssh_env} . ${_plugin__ssh_env} > /dev/null # load identies @@ -55,4 +56,3 @@ fi unfunction _plugin__start_agent unset _plugin__forwarding unset _plugin__ssh_env -