From eff5cada589f25793dbe63a76aba9da39837a148 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 23 Oct 2013 16:31:10 +1100 Subject: - djm@cvs.openbsd.org 2013/10/23 03:05:19 [readconf.c ssh.c] comment --- ChangeLog | 3 +++ readconf.c | 3 ++- ssh.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0bdf5c6c..85cc3ec66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ [readconf.c] Hostname may have %h sequences that should be expanded prior to Match evaluation; spotted by Iain Morgan + - djm@cvs.openbsd.org 2013/10/23 03:05:19 + [readconf.c ssh.c] + comment 20131018 - (djm) OpenBSD CVS Sync diff --git a/readconf.c b/readconf.c index dad249007..f18666786 100644 --- a/readconf.c +++ b/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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -470,6 +470,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/ssh.c b/ssh.c index 835f4822a..11fdb309d 100644 --- a/ssh.c +++ b/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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -900,6 +900,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); -- cgit v1.2.3