diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2020-07-17 07:09:25 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2020-07-17 07:09:25 +0000 |
commit | a646e1c70b9c6ae16eaec93aea12a8c797807a24 (patch) | |
tree | f37694fde212226fb5ee826d44a13398b5956450 /usr.bin/ssh | |
parent | ba1f30842f16bc72dd311f3cf188c0fe2dc94729 (diff) |
Add %k to the TOKENs for Match Exec for consistency with the other keywords
that recently got %k.
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/readconf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 265bfb75692..8f920675f55 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.332 2020/07/05 23:59:45 djm Exp $ */ +/* $OpenBSD: readconf.c,v 1.333 2020/07/17 07:09:24 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -650,7 +650,7 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw, if (r == (negate ? 1 : 0)) this_result = result = 0; } else if (strcasecmp(attrib, "exec") == 0) { - char *conn_hash_hex; + char *conn_hash_hex, *keyalias; if (gethostname(thishost, sizeof(thishost)) == -1) fatal("gethostname: %s", strerror(errno)); @@ -661,12 +661,15 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw, (unsigned long long)pw->pw_uid); conn_hash_hex = ssh_connection_hash(thishost, host, portstr, ruser); + keyalias = options->host_key_alias ? + options->host_key_alias : host; cmd = percent_expand(arg, "C", conn_hash_hex, "L", shorthost, "d", pw->pw_dir, "h", host, + "k", keyalias, "l", thishost, "n", original_host, "p", portstr, |