diff options
author | 2016-10-18 17:32:54 +0000 | |
---|---|---|
committer | 2016-10-18 17:32:54 +0000 | |
commit | 1e093524f9a8016f20133b4578e502a0a5cbbfeb (patch) | |
tree | 8744c5e912b8a85674d92e4820f73f179b68a66c | |
parent | Merge ufs/{ufs,ffs}/ into ffs/. (diff) | |
download | wireguard-openbsd-1e093524f9a8016f20133b4578e502a0a5cbbfeb.tar.xz wireguard-openbsd-1e093524f9a8016f20133b4578e502a0a5cbbfeb.zip |
Remove channel_input_port_forward_request(); the only caller was the
recently-removed SSH1 server code so it's now dead code. ok markus@
-rw-r--r-- | usr.bin/ssh/channels.c | 39 | ||||
-rw-r--r-- | usr.bin/ssh/channels.h | 3 |
2 files changed, 2 insertions, 40 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 42b93677d7f..c34f729f6ff 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.355 2016/09/30 20:24:46 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.356 2016/10/18 17:32:54 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -3773,43 +3773,6 @@ channel_request_rforward_cancel(struct Forward *fwd) } /* - * This is called after receiving CHANNEL_FORWARDING_REQUEST. This initates - * listening for the port, and sends back a success reply (or disconnect - * message if there was an error). - */ -int -channel_input_port_forward_request(int is_root, struct ForwardOptions *fwd_opts) -{ - int success = 0; - struct Forward fwd; - - /* Get arguments from the packet. */ - memset(&fwd, 0, sizeof(fwd)); - fwd.listen_port = packet_get_int(); - fwd.connect_host = packet_get_string(NULL); - fwd.connect_port = packet_get_int(); - - /* - * Check that an unprivileged user is not trying to forward a - * privileged port. - */ - if (fwd.listen_port < IPPORT_RESERVED && !is_root) - packet_disconnect( - "Requested forwarding of port %d but user is not root.", - fwd.listen_port); - if (fwd.connect_port == 0) - packet_disconnect("Dynamic forwarding denied."); - - /* Initiate forwarding */ - success = channel_setup_local_fwd_listener(&fwd, fwd_opts); - - /* Free the argument string. */ - free(fwd.connect_host); - - return (success ? 0 : -1); -} - -/* * Permits opening to any host/port if permitted_opens[] is empty. This is * usually called by the server, because the user could connect to any port * anyway, and the server has no way to know but to trust the client anyway. diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index 3756fa2d0ad..ff332084001 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.119 2016/09/30 09:19:13 markus Exp $ */ +/* $OpenBSD: channels.h,v 1.120 2016/10/18 17:32:54 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -272,7 +272,6 @@ void channel_update_permitted_opens(int, int); void channel_clear_permitted_opens(void); void channel_clear_adm_permitted_opens(void); void channel_print_adm_permitted_opens(void); -int channel_input_port_forward_request(int, struct ForwardOptions *); Channel *channel_connect_to_port(const char *, u_short, char *, char *); Channel *channel_connect_to_path(const char *, char *, char *); Channel *channel_connect_stdio_fwd(const char*, u_short, int, int); |