OpenSSH 3.6.1p1 "Proxy-None" patch

Markus Friedl markus at openbsd.org
Tue Apr 15 00:35:00 EST 2003


On Mon, Apr 14, 2003 at 03:11:40PM +0200, Olaf Püschel wrote:
> While using OpenSSH for quite a while, I became annoyed with the
> inflexible config-file parsing algorithm. I special it did not
> alow me to express: "Use *no* proxy for host xyz, but *this* proxy
> for all other hosts". 

3.6.1 already supports 'none' but it's broken.

this patch against 3.6.1 should make
	ProxyCommand none
work:

Index: readconf.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/readconf.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -IOpenBSD -r1.105 -r1.106
--- readconf.c	2 Apr 2003 09:48:07 -0000	1.105
+++ readconf.c	9 Apr 2003 12:00:37 -0000	1.106
@@ -279,6 +279,13 @@
 	size_t len;
 	u_short fwd_port, fwd_host_port;
 	char sfwd_host_port[6];
+
+	/* Strip trailing whitespace */
+	for(len = strlen(line) - 1; len > 0; len--) {
+		if (strchr(WHITESPACE, line[len]) == NULL)
+			break;
+		line[len] = '\0';
+	}
 
 	s = line;
 	/* Get the keyword. (Each line is supposed to begin with a keyword). */




More information about the openssh-unix-dev mailing list