summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2006-07-21 12:43:37 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2006-07-21 12:43:37 +0000
commit89cfae38eaeda7d6d65a73ed0bdb0bac0435af93 (patch)
tree955dd1cc6bbb3e8cc0c8e27513ddce0fede9ae44 /usr.bin/ssh/channels.c
parent5c5f5d9ed37fd5eb31caca10e723a3d418b3152e (diff)
Make PermitOpen take a list of permitted ports and act more like most other
keywords (ie the first match is the effective setting). This also makes it easier to override a previously set PermitOpen. ok djm@
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 0e9f9e596bd..adb7e079653 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.257 2006/07/17 12:06:00 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.258 2006/07/21 12:43:36 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2633,17 +2633,17 @@ channel_add_permitted_opens(char *host, int port)
all_opens_permitted = 0;
}
-void
+int
channel_add_adm_permitted_opens(char *host, int port)
{
if (num_adm_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION)
fatal("channel_add_adm_permitted_opens: too many forwards");
- debug("allow port forwarding to host %s port %d", host, port);
+ debug("config allows port forwarding to host %s port %d", host, port);
permitted_adm_opens[num_adm_permitted_opens].host_to_connect
= xstrdup(host);
permitted_adm_opens[num_adm_permitted_opens].port_to_connect = port;
- num_adm_permitted_opens++;
+ return ++num_adm_permitted_opens;
}
void