From unknown Sun Jul 27 09:35:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49699: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS 10.14 Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49699 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 49699@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162698298431738 (code B ref -1); Thu, 22 Jul 2021 19:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jul 2021 19:43:04 +0000 Received: from localhost ([127.0.0.1]:41666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6eb2-0008Fq-0w for submit@debbugs.gnu.org; Thu, 22 Jul 2021 15:43:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:42034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6eb0-0008Fi-3R for submit@debbugs.gnu.org; Thu, 22 Jul 2021 15:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6eaz-0002D9-PP for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 15:43:01 -0400 Received: from ns.lapseofthought.com ([50.0.39.240]:64379 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6eax-0000Md-Sq for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 15:43:01 -0400 Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:49e1:3d1d:4e87:3a3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4GW2t5598dz3pdpf for ; Thu, 22 Jul 2021 12:42:53 -0700 (PDT) From: Alex Bochannek Date: Thu, 22 Jul 2021 12:42:53 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hello! On macOS 10.14 (and some 10.15) with a pre-8.0 OpenSSH, the check for the `-T' option when using SCP gives an incorrect result because the error message (presumably from the BSD getopt(3)) is different than what is checked for. The below patch fixes that. Apple upgraded OpenSSH from 7.9 to 8.1 for macOS 10.15.4 and with that the `-T' option to SCP became available. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8b4c78fe65..f94508303d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4782,7 +4782,9 @@ tramp-scp-strict-file-name-checking (with-temp-buffer (tramp-call-process vec "scp" nil t nil "-T") (goto-char (point-min)) - (unless (search-forward-regexp "unknown option -- T" nil t) + (unless + (search-forward-regexp + "\\(illegal\\|unknown\\) option -- T" nil t) (setq tramp-scp-strict-file-name-checking "-T"))))))) tramp-scp-strict-file-name-checking))) --=-=-= Content-Type: text/plain Thanks! -- Alex. --=-=-=-- From unknown Sun Jul 27 09:35:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alex Bochannek Subject: bug#49699: closed (Re: bug#49699: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS 10.14) Message-ID: References: <87k0lgvq25.fsf@gmx.de> X-Gnu-PR-Message: they-closed 49699 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 49699@debbugs.gnu.org Date: Fri, 23 Jul 2021 18:34:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1627065242-18291-1" This is a multi-part message in MIME format... ------------=_1627065242-18291-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49699: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS= 10.14 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49699@debbugs.gnu.org. --=20 49699: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49699 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1627065242-18291-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49699-done) by debbugs.gnu.org; 23 Jul 2021 18:33:05 +0000 Received: from localhost ([127.0.0.1]:44619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zyr-0004jt-K4 for submit@debbugs.gnu.org; Fri, 23 Jul 2021 14:33:05 -0400 Received: from mout.gmx.net ([212.227.17.20]:45635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6zyo-0004jP-Pi for 49699-done@debbugs.gnu.org; Fri, 23 Jul 2021 14:33:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1627065171; bh=X5brEoBOKjRtUGDRYC+kqx1joCXF58/WUxLmW1hcQUY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=gQwxKYO0pzdJcZrYcSOhHs3ZDNrpppZstIsqSt6xHE6X4BHLLqNTPw5jE1eApAw6z bx2x30KZMbTlu7PNG3nX5C//W3F6ltnIqmCZLzMZWhfqdEaatG28LtGeFORonA1b7M Me6LB5n81NL+XHuWFd1vp4fBUhyVtRcvlZaUoPGg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.183]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5mGB-1l0DyS2uTb-017Gu1; Fri, 23 Jul 2021 20:32:51 +0200 From: Michael Albinus To: Alex Bochannek Subject: Re: bug#49699: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS 10.14 References: Date: Fri, 23 Jul 2021 20:32:50 +0200 In-Reply-To: (Alex Bochannek's message of "Thu, 22 Jul 2021 12:42:53 -0700") Message-ID: <87k0lgvq25.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:3sPrLr19NtIO0K/+9VYxCmlUxT8PFt8eu86yngfQXXJwridjD+D Z7RZSu022ukGvPvQZlJP3YyBairTPuySWQDb3x1KuifNm3ZXjTS/GPliHgXawYgJJkKWLbR AuUOJOSAeiYEEnPbWYhB8E5T6rGW98u7YM/i0Nj3SXm3oBmixmXK0SJ3kyImYnZQIlBofwa 7gldHlRz4oTcKuPll4zWQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:U9+OMICY6FU=:YsntxvVMsGms5jdXo7OrYy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h kYamHPdNakUXU+hi39FU69kG29BBSaxuradn3JwecsRuBhW4BdpejlSmQ== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49699-done Cc: 49699-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 28.1 Alex Bochannek writes: > Hello! Hi Alex, > On macOS 10.14 (and some 10.15) with a pre-8.0 OpenSSH, the check for > the `-T' option when using SCP gives an incorrect result because the > error message (presumably from the BSD getopt(3)) is different than what > is checked for. The below patch fixes that. Thanks for this, I've pushed it to master. Closing the bug. > Thanks! Best regards, Michael. ------------=_1627065242-18291-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jul 2021 19:43:04 +0000 Received: from localhost ([127.0.0.1]:41666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6eb2-0008Fq-0w for submit@debbugs.gnu.org; Thu, 22 Jul 2021 15:43:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:42034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6eb0-0008Fi-3R for submit@debbugs.gnu.org; Thu, 22 Jul 2021 15:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6eaz-0002D9-PP for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 15:43:01 -0400 Received: from ns.lapseofthought.com ([50.0.39.240]:64379 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6eax-0000Md-Sq for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2021 15:43:01 -0400 Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:49e1:3d1d:4e87:3a3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4GW2t5598dz3pdpf for ; Thu, 22 Jul 2021 12:42:53 -0700 (PDT) From: Alex Bochannek To: bug-gnu-emacs@gnu.org Subject: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS 10.14 Date: Thu, 22 Jul 2021 12:42:53 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hello! On macOS 10.14 (and some 10.15) with a pre-8.0 OpenSSH, the check for the `-T' option when using SCP gives an incorrect result because the error message (presumably from the BSD getopt(3)) is different than what is checked for. The below patch fixes that. Apple upgraded OpenSSH from 7.9 to 8.1 for macOS 10.15.4 and with that the `-T' option to SCP became available. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8b4c78fe65..f94508303d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4782,7 +4782,9 @@ tramp-scp-strict-file-name-checking (with-temp-buffer (tramp-call-process vec "scp" nil t nil "-T") (goto-char (point-min)) - (unless (search-forward-regexp "unknown option -- T" nil t) + (unless + (search-forward-regexp + "\\(illegal\\|unknown\\) option -- T" nil t) (setq tramp-scp-strict-file-name-checking "-T"))))))) tramp-scp-strict-file-name-checking))) --=-=-= Content-Type: text/plain Thanks! -- Alex. --=-=-=-- ------------=_1627065242-18291-1-- From unknown Sun Jul 27 09:35:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#49699: 28.0.50; [PATCH] tramp-scp-strict-file-name-checking fails on macOS 10.14 Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 21:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49699 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Michael Albinus Cc: 49699-done@debbugs.gnu.org Received: via spool by 49699-done@debbugs.gnu.org id=D49699.162707549910384 (code D ref 49699); Fri, 23 Jul 2021 21:25:02 +0000 Received: (at 49699-done) by debbugs.gnu.org; 23 Jul 2021 21:24:59 +0000 Received: from localhost ([127.0.0.1]:44771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m72fD-0002hQ-6C for submit@debbugs.gnu.org; Fri, 23 Jul 2021 17:24:59 -0400 Received: from ns.lapseofthought.com ([50.0.39.240]:12322 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m72fA-0002hF-At for 49699-done@debbugs.gnu.org; Fri, 23 Jul 2021 17:24:58 -0400 Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:159c:a57c:b4dc:a73a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4GWj5K4HZ0z3pdgb; Fri, 23 Jul 2021 14:24:53 -0700 (PDT) From: Alex Bochannek References: <87k0lgvq25.fsf@gmx.de> Date: Fri, 23 Jul 2021 14:24:53 -0700 In-Reply-To: <87k0lgvq25.fsf@gmx.de> (Michael Albinus's message of "Fri, 23 Jul 2021 20:32:50 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Version: 28.1 > > Alex Bochannek writes: > >> Hello! > > Hi Alex, > >> On macOS 10.14 (and some 10.15) with a pre-8.0 OpenSSH, the check for >> the `-T' option when using SCP gives an incorrect result because the >> error message (presumably from the BSD getopt(3)) is different than what >> is checked for. The below patch fixes that. > > Thanks for this, I've pushed it to master. Closing the bug. Thanks! -- Alex.