summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/session.c b/session.c
index f2bcfd061..16e455588 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.234 2008/04/18 22:01:33 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.235 2008/05/07 05:49:37 pyr Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -335,7 +335,8 @@ do_authenticated1(Authctxt *authctxt)
335 break; 335 break;
336 336
337 case SSH_CMSG_AGENT_REQUEST_FORWARDING: 337 case SSH_CMSG_AGENT_REQUEST_FORWARDING:
338 if (no_agent_forwarding_flag || compat13) { 338 if (!options.allow_agent_forwarding ||
339 no_agent_forwarding_flag || compat13) {
339 debug("Authentication agent forwarding not permitted for this authentication."); 340 debug("Authentication agent forwarding not permitted for this authentication.");
340 break; 341 break;
341 } 342 }
@@ -2081,7 +2082,7 @@ session_auth_agent_req(Session *s)
2081{ 2082{
2082 static int called = 0; 2083 static int called = 0;
2083 packet_check_eom(); 2084 packet_check_eom();
2084 if (no_agent_forwarding_flag) { 2085 if (no_agent_forwarding_flag || !options.allow_agent_forwarding) {
2085 debug("session_auth_agent_req: no_agent_forwarding_flag"); 2086 debug("session_auth_agent_req: no_agent_forwarding_flag");
2086 return 0; 2087 return 0;
2087 } 2088 }