summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-06-16 13:18:34 +1000
committerDamien Miller <djm@mindrot.org>2005-06-16 13:18:34 +1000
commit6476cad9bb6b8a9524a153639b4ebceb3427e743 (patch)
tree59e9068c25f8d9c6d7e51f66e3c8c983c52db0d9 /ssh.c
parent05656967b111a7c2b1f831eab0c31002dfac6fa9 (diff)
downloadopenssh-git-6476cad9bb6b8a9524a153639b4ebceb3427e743.tar.gz
- djm@cvs.openbsd.org 2005/06/06 11:20:36
[auth.c auth.h misc.c misc.h ssh.c ssh_config.5 sshconnect.c] introduce a generic %foo expansion function. replace existing % expansion and add expansion to ControlPath; ok markus@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ssh.c b/ssh.c
index 43ecbd92..0871d06d 100644
--- a/ssh.c
+++ b/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>
@@ -609,8 +609,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");