summaryrefslogtreecommitdiffstats
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh.c b/ssh.c
index ea52bbf5..7a536a0f 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.439 2016/05/04 12:21:53 markus Exp $ */
+/* $OpenBSD: ssh.c,v 1.440 2016/05/04 14:29:58 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1336,7 +1336,8 @@ main(int ac, char **av)
load_public_identity_files();
/* optionally set the SSH_AUTHSOCKET_ENV_NAME varibale */
- if (options.identity_agent) {
+ if (options.identity_agent &&
+ strcmp(options.identity_agent, SSH_AUTHSOCKET_ENV_NAME) != 0) {
if (strcmp(options.identity_agent, "none") == 0) {
unsetenv(SSH_AUTHSOCKET_ENV_NAME);
} else {