mirror of git://anongit.mindrot.org/openssh.git
parent
084bcd24e9
commit
eff5cada58
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
3
ssh.c
3
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
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue