summaryrefslogtreecommitdiffhomepage
path: root/svr-tcpfwd.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2008-09-08 15:14:02 +0000
committerMatt Johnston <matt@ucc.asn.au>2008-09-08 15:14:02 +0000
commitc0ce2a6a97af66881675916c504af9caed2f9c2e (patch)
treebfecee9bdef1a76204f9f19cc4518166ae7c6f23 /svr-tcpfwd.c
parentf90f64b5c1a974a77a4bdf4a7ccb3f4d359b9127 (diff)
* Patch from Frédéric Moulins adding options to authorized_keys.
Needs review. --HG-- branch : pubkey-options extra : convert_revision : 26872f944d79ddacff1070aab32115a6d726392c
Diffstat (limited to 'svr-tcpfwd.c')
-rw-r--r--svr-tcpfwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c
index d4dca6b..a55361b 100644
--- a/svr-tcpfwd.c
+++ b/svr-tcpfwd.c
@@ -32,6 +32,7 @@
#include "packet.h"
#include "listener.h"
#include "runopts.h"
+#include "auth.h"
#ifdef ENABLE_SVR_REMOTETCPFWD
@@ -72,7 +73,7 @@ void recv_msg_global_request_remotetcp() {
TRACE(("enter recv_msg_global_request_remotetcp"))
- if (svr_opts.noremotetcp) {
+ if (svr_opts.noremotetcp || !svr_pubkey_allows_tcpfwd()) {
TRACE(("leave recv_msg_global_request_remotetcp: remote tcp forwarding disabled"))
goto out;
}
@@ -236,7 +237,7 @@ static int newtcpdirect(struct Channel * channel) {
int len;
int err = SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
- if (svr_opts.nolocaltcp) {
+ if (svr_opts.nolocaltcp || !svr_pubkey_allows_tcpfwd()) {
TRACE(("leave newtcpdirect: local tcp forwarding disabled"))
goto out;
}