diff options
author | 2005-06-06 11:20:36 +0000 | |
---|---|---|
committer | 2005-06-06 11:20:36 +0000 | |
commit | b33c0bff8ac8c1f60fa2f73fb1a062ed7f040e7d (patch) | |
tree | a552523a5d81dfd38b6a73af3b643e2829c2c1d6 /usr.bin/ssh/ssh.c | |
parent | Backout 1.64, switch back to two-pool allocation scheme (with oldnointr (diff) | |
download | wireguard-openbsd-b33c0bff8ac8c1f60fa2f73fb1a062ed7f040e7d.tar.xz wireguard-openbsd-b33c0bff8ac8c1f60fa2f73fb1a062ed7f040e7d.zip |
introduce a generic %foo expansion function. replace existing % expansion and
add expansion to ControlPath; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 3ae12269318..cd2b82cd99f 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.240 2005/05/27 08:30:37 djm Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.241 2005/06/06 11:20:36 djm Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -602,8 +602,12 @@ again: options.proxy_command = NULL; if (options.control_path != NULL) { - options.control_path = tilde_expand_filename( - options.control_path, original_real_uid); + snprintf(buf, sizeof(buf), "%d", options.port); + cp = tilde_expand_filename(options.control_path, + original_real_uid); + options.control_path = percent_expand(cp, "p", buf, "h", host, + "r", options.user, (char *)NULL); + xfree(cp); } if (mux_command != 0 && options.control_path == NULL) fatal("No ControlPath specified for \"-O\" command"); |