summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-10-23 03:05:20 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-10-23 03:05:20 +0000
commit8d4114880ba735be459920d5ec0f696655db65e8 (patch)
treea1250995ff1be61470d7e7cfa397103f28f2e4ee
parent6b3ecbf52760c47ffcacffa4f6b10b546d6bab67 (diff)
comment
-rw-r--r--usr.bin/ssh/readconf.c3
-rw-r--r--usr.bin/ssh/ssh.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index d586a6b2cf1..e91a3cbc9e9 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.211 2013/10/23 03:03:07 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.212 2013/10/23 03:05:19 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -464,6 +464,7 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw,
port = options->port <= 0 ? default_ssh_port() : options->port;
ruser = options->user == NULL ? pw->pw_name : options->user;
if (options->hostname != NULL) {
+ /* NB. Please keep in sync with ssh.c:main() */
host = percent_expand(options->hostname,
"h", host_arg, (char *)NULL);
} else
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 6682f92683c..32b73b784e7 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.388 2013/10/17 00:46:49 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.389 2013/10/23 03:05:19 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -868,6 +868,7 @@ main(int ac, char **av)
/* preserve host name given on command line for %n expansion */
if (options.hostname != NULL) {
+ /* NB. Please keep in sync with readconf.c:match_cfg_line() */
cp = percent_expand(options.hostname,
"h", host, (char *)NULL);
free(host);