From owner-svn-ports-all@freebsd.org Thu Apr 12 21:54:02 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8527BF9453D; Thu, 12 Apr 2018 21:54:02 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32AB67CFCD; Thu, 12 Apr 2018 21:54:02 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D881110F8; Thu, 12 Apr 2018 21:54:02 +0000 (UTC) (envelope-from leres@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3CLs2Fq076858; Thu, 12 Apr 2018 21:54:02 GMT (envelope-from leres@FreeBSD.org) Received: (from leres@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3CLs1mL076856; Thu, 12 Apr 2018 21:54:01 GMT (envelope-from leres@FreeBSD.org) Message-Id: <201804122154.w3CLs1mL076856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leres set sender to leres@FreeBSD.org using -f From: Craig Leres Date: Thu, 12 Apr 2018 21:54:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r467200 - in head/security/openssh-portable: . files X-SVN-Group: ports-head X-SVN-Commit-Author: leres X-SVN-Commit-Paths: in head/security/openssh-portable: . files X-SVN-Commit-Revision: 467200 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Apr 2018 21:54:02 -0000 Author: leres Date: Thu Apr 12 21:54:01 2018 New Revision: 467200 URL: https://svnweb.freebsd.org/changeset/ports/467200 Log: The block of code that canonicallizes the hostname supplied on the command line added by patch-ssh.c misapplies to 7.7p1 and moves from main() to to ssh_session2(). This breaks ssh SSHFP support for non-canonical hostnames. For example, "ssh zinc" correctly discovers the FQDN (zinc.ee.lbl.gov) and uses it to look up A and AAAA records but the non-canonical version (zinc) is used in the SSHFP record lookup which or course fails. Regenerate the patch. Reviewed by: bdrewery, ler (mentor) Approved by: bdrewery, ler (mentor) Differential Revision: https://reviews.freebsd.org/D15053 Modified: head/security/openssh-portable/Makefile head/security/openssh-portable/files/patch-ssh.c Modified: head/security/openssh-portable/Makefile ============================================================================== --- head/security/openssh-portable/Makefile Thu Apr 12 21:45:23 2018 (r467199) +++ head/security/openssh-portable/Makefile Thu Apr 12 21:54:01 2018 (r467200) @@ -3,7 +3,7 @@ PORTNAME= openssh DISTVERSION= 7.7p1 -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= security ipv6 MASTER_SITES= OPENBSD/OpenSSH/portable Modified: head/security/openssh-portable/files/patch-ssh.c ============================================================================== --- head/security/openssh-portable/files/patch-ssh.c Thu Apr 12 21:45:23 2018 (r467199) +++ head/security/openssh-portable/files/patch-ssh.c Thu Apr 12 21:54:01 2018 (r467200) @@ -5,11 +5,11 @@ Changed paths: Canonicize the host name before looking it up in the host file. ---- ssh.c.orig 2010-08-16 09:59:31.000000000 -0600 -+++ ssh.c 2010-08-25 17:55:01.000000000 -0600 -@@ -699,6 +699,23 @@ - "h", host, (char *)NULL); - } +--- ssh.c.orig 2018-04-02 05:38:28 UTC ++++ ssh.c +@@ -1281,6 +1281,23 @@ main(int ac, char **av) + ssh_digest_free(md); + conn_hash_hex = tohex(conn_hash, ssh_digest_bytes(SSH_DIGEST_SHA1)); + /* Find canonic host name. */ + if (strchr(host, '.') == 0) { @@ -28,6 +28,6 @@ Canonicize the host name before looking it up in the h + } + } + - if (options.local_command != NULL) { - char thishost[NI_MAXHOST]; - + /* + * Expand tokens in arguments. NB. LocalCommand is expanded later, + * after port-forwarding is set up, so it may pick up any local