Bugzilla – Attachment 995 Details for
Bug 1103
New option for ssh(1) to make it failing when remote port forwarding can't be established
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch.
ssh[1].diff (text/plain), 3.28 KB, created by
Maxim Sobolev
on 2005-10-14 01:16:08 AEST
(
hide
)
Description:
Proposed patch.
Filename:
MIME Type:
Creator:
Maxim Sobolev
Created:
2005-10-14 01:16:08 AEST
Size:
3.28 KB
patch
obsolete
>--- readconf.c 2005/10/12 18:46:52 1.1 >+++ readconf.c 2005/10/12 20:52:31 >@@ -107,7 +107,7 @@ > oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, > oAddressFamily, oGssAuthentication, oGssDelegateCreds, > oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, >- oVersionAddendum, >+ oVersionAddendum, oRemoteForwardIsRequired, > oDeprecated, oUnsupported > } OpCodes; > >@@ -196,6 +196,7 @@ > { "serveraliveinterval", oServerAliveInterval }, > { "serveralivecountmax", oServerAliveCountMax }, > { "versionaddendum", oVersionAddendum }, >+ { "remoteforwardisrequired", oRemoteForwardIsRequired }, > { NULL, oBadOption } > }; > >@@ -759,6 +760,10 @@ > } while (arg != NULL && *arg != '\0'); > break; > >+ case oRemoteForwardIsRequired: >+ intptr = &options->remote_forward_is_required; >+ goto parse_flag; >+ > case oDeprecated: > debug("%s line %d: Deprecated option \"%s\"", > filename, linenum, keyword); >@@ -889,6 +894,7 @@ > options->verify_host_key_dns = -1; > options->server_alive_interval = -1; > options->server_alive_count_max = -1; >+ options->remote_forward_is_required = -1; > } > > /* >@@ -1009,6 +1015,8 @@ > options->server_alive_interval = 0; > if (options->server_alive_count_max == -1) > options->server_alive_count_max = 3; >+ if (options->remote_forward_is_required == -1) >+ options->remote_forward_is_required = 0; > /* options->proxy_command should not be set by default */ > /* options->user will be set in the main program if appropriate */ > /* options->hostname will be set in the main program if appropriate */ >--- readconf.h 2005/10/12 18:53:21 1.1 >+++ readconf.h 2005/10/12 18:54:13 >@@ -103,6 +103,7 @@ > int identities_only; > int server_alive_interval; > int server_alive_count_max; >+ int remote_forward_is_required; > } Options; > > >--- ssh.1 2005/10/12 18:46:52 1.1 >+++ ssh.1 2005/10/12 19:01:43 >@@ -649,6 +649,7 @@ > .It ProxyCommand > .It PubkeyAuthentication > .It RemoteForward >+.It RemoteForwardIsRequired > .It RhostsRSAAuthentication > .It RSAAuthentication > .It ServerAliveInterval >--- ssh.c 2005/10/12 18:58:10 1.1 >+++ ssh.c 2005/10/12 18:59:37 >@@ -1019,8 +1019,13 @@ > options.remote_forwards[i].host, > options.remote_forwards[i].host_port); > if (type == SSH2_MSG_REQUEST_FAILURE) >- logit("Warning: remote port forwarding failed for listen port %d", >- options.remote_forwards[i].port); >+ if (options.remote_forward_is_required == 0) { >+ logit("Warning: remote port forwarding failed for listen port %d", >+ options.remote_forwards[i].port); >+ } else { >+ fatal("Remote port forwarding failed for listen port %d", >+ options.remote_forwards[i].port); >+ } > } > > /* request pty/x11/agent/tcpfwd/shell for channel */ >--- ssh_config.5 2005/10/12 18:46:52 1.1 >+++ ssh_config.5 2005/10/12 19:09:01 >@@ -547,6 +547,17 @@ > Multiple forwardings may be specified, and additional > forwardings can be given on the command line. > Only the superuser can forward privileged ports. >+.It Cm RemoteForwardIsRequired >+If this flag is set to >+.Dq yes , >+the client will exit with error code if attempt to establish at least >+one of remote port forwardings fails for some reason. >+The argument to this keyword must be >+.Dq yes >+or >+.Dq no . >+The default is >+.Dq no . > .It Cm RhostsRSAAuthentication > Specifies whether to try rhosts based authentication with RSA host > authentication.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1103
: 995