Bugzilla – Attachment 177 Details for
Bug 433
Allow "ProxyCommand none" in ssh_config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch as discussed in openssh-unix-dev's thread 'Allow "ProxyCommand none" in ssh_config'
sshconnect-proxycommand-none.patch (text/plain), 2.52 KB, created by
Thomas Binder
on 2002-11-12 02:35:23 AEDT
(
hide
)
Description:
Patch as discussed in openssh-unix-dev's thread 'Allow "ProxyCommand none" in ssh_config'
Filename:
MIME Type:
Creator:
Thomas Binder
Created:
2002-11-12 02:35:23 AEDT
Size:
2.52 KB
patch
obsolete
>? confdefs.h >Index: sshconnect.c >=================================================================== >RCS file: /cvs/openssh/sshconnect.c,v >retrieving revision 1.101 >diff -u -u -r1.101 sshconnect.c >--- sshconnect.c 19 Sep 2002 02:05:04 -0000 1.101 >+++ sshconnect.c 11 Nov 2002 15:18:52 -0000 >@@ -50,6 +50,24 @@ > static int show_other_keys(const char *, Key *); > > /* >+ * Check whether the configured proxy command is to be used >+ */ >+static int >+ssh_use_proxy_command(const char *proxy_command) >+{ >+ /* >+ * If proxy_command is NULL or points to " none", don't use it. >+ * Note that we have to compare against " none" (and not "none"), >+ * because the code that parses ProxyCommand in readconf.c always adds >+ * a space in front of the actual command. >+ */ >+ if (proxy_command == NULL || strcmp(proxy_command, " none") == 0) >+ return 0; >+ else >+ return 1; >+} >+ >+/* > * Connect to the given ssh server using a proxy command. > */ > static int >@@ -219,9 +237,9 @@ > * a privileged port will be allocated to make the connection. > * This requires super-user privileges if needpriv is true. > * Connection_attempts specifies the maximum number of tries (one per >- * second). If proxy_command is non-NULL, it specifies the command (with %h >- * and %p substituted for host and port, respectively) to use to contact >- * the daemon. >+ * second). If proxy_command is non-NULL and not "none", it specifies >+ * the command (with %h and %p substituted for host and port, >+ * respectively) to use to contact the daemon. > * Return values: > * 0 for OK > * ECONNREFUSED if we got a "Connection Refused" by the peer on any address >@@ -258,7 +276,7 @@ > port = SSH_DEFAULT_PORT; > } > /* If a proxy command is given, connect using it. */ >- if (proxy_command != NULL) >+ if (ssh_use_proxy_command(proxy_command) == 1) > return ssh_proxy_connect(host, port, proxy_command); > > /* No proxy command. */ >@@ -535,7 +553,7 @@ > * We don't have the remote ip-address for connections > * using a proxy command > */ >- if (options.proxy_command == NULL) { >+ if (ssh_use_proxy_command(options.proxy_command) == 0) { > if (getnameinfo(hostaddr, salen, ntop, sizeof(ntop), > NULL, 0, NI_NUMERICHOST) != 0) > fatal("check_host_key: getnameinfo failed"); >@@ -548,7 +566,8 @@ > * command or if we don't have a hostname to compare with > */ > if (options.check_host_ip && >- (local || strcmp(host, ip) == 0 || options.proxy_command != NULL)) >+ (local || strcmp(host, ip) == 0 || >+ ssh_use_proxy_command(options.proxy_command) == 1)) > options.check_host_ip = 0; > > /*
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 433
: 177 |
218