[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssh-commits
Subject:    [openssh-commits] [openssh] 03/03: upstream: Add %k to the TOKENs for Match Exec for consistency wit
From:       git+noreply () mindrot ! org
Date:       2020-07-17 8:03:48
Message-ID: a00019b9b4534b41 () fuyu ! mindrot ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit a2855c048b3f4b17d8787bd3f24232ec0cd79abe
Author: dtucker@openbsd.org <dtucker@openbsd.org>
Date:   Fri Jul 17 07:09:24 2020 +0000

    upstream: Add %k to the TOKENs for Match Exec for consistency with
    
    the other keywords that recently got %k.
    
    OpenBSD-Commit-ID: 1857d1c40f270cbc254fca91e66110641dddcfdb
---
 readconf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/readconf.c b/readconf.c
index 9e597748..a810736a 100644
--- a/readconf.c
+++ b/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
@@ -664,7 +664,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));
@@ -675,12 +675,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,

-- 
To stop receiving notification emails like this one, please contact
djm@mindrot.org.
_______________________________________________
openssh-commits mailing list
openssh-commits@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic