summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--options.h2
-rw-r--r--svr-agentfwd.c2
-rw-r--r--svr-chansession.c8
-rw-r--r--sysoptions.h4
4 files changed, 10 insertions, 6 deletions
diff --git a/options.h b/options.h
index 23bac9d..8b49f30 100644
--- a/options.h
+++ b/options.h
@@ -64,7 +64,7 @@ much traffic. */
#define ENABLE_SVR_LOCALTCPFWD
#define ENABLE_SVR_REMOTETCPFWD
-/* Enable Authentication Agent Forwarding - server only for now */
+/* Enable Authentication Agent Forwarding */
#define ENABLE_SVR_AGENTFWD
#define ENABLE_CLI_AGENTFWD
diff --git a/svr-agentfwd.c b/svr-agentfwd.c
index ef0d757..054a3b5 100644
--- a/svr-agentfwd.c
+++ b/svr-agentfwd.c
@@ -27,7 +27,7 @@
#include "includes.h"
-#ifndef DISABLE_AGENTFWD
+#ifdef ENABLE_SVR_AGENTFWD
#include "agentfwd.h"
#include "session.h"
diff --git a/svr-chansession.c b/svr-chansession.c
index 1b5fcc6..a914f25 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -240,7 +240,7 @@ static int newchansess(struct Channel *channel) {
chansess->x11authcookie = NULL;
#endif
-#ifndef DISABLE_AGENTFWD
+#ifdef ENABLE_AGENTFWD
chansess->agentlistener = NULL;
chansess->agentfile = NULL;
chansess->agentdir = NULL;
@@ -293,7 +293,7 @@ static void closechansess(struct Channel *channel) {
x11cleanup(chansess);
#endif
-#ifndef DISABLE_AGENTFWD
+#ifdef ENABLE_AGENTFWD
svr_agentcleanup(chansess);
#endif
@@ -351,7 +351,7 @@ static void chansessionrequest(struct Channel *channel) {
} else if (strcmp(type, "x11-req") == 0) {
ret = x11req(chansess);
#endif
-#ifndef DISABLE_AGENTFWD
+#ifdef ENABLE_AGENTFWD
} else if (strcmp(type, "auth-agent-req@openssh.com") == 0) {
ret = svr_agentreq(chansess);
#endif
@@ -937,7 +937,7 @@ static void execchild(void *user_data) {
/* set up X11 forwarding if enabled */
x11setauth(chansess);
#endif
-#ifndef DISABLE_AGENTFWD
+#ifdef ENABLE_AGENTFWD
/* set up agent env variable */
svr_agentset(chansess);
#endif
diff --git a/sysoptions.h b/sysoptions.h
index 2329391..216ab64 100644
--- a/sysoptions.h
+++ b/sysoptions.h
@@ -162,6 +162,10 @@
#define USING_LISTENERS
#endif
+#if defined(ENABLE_SVR_AGENTFWD) || defined(ENABLE_CLI_LOCALTCPFWD)
+#define ENABLE_AGENTFWD
+#endif
+
#if defined(ENABLE_CLI_NETCAT) && defined(ENABLE_CLI_PROXYCMD)
#define ENABLE_CLI_MULTIHOP
#endif