From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: SCPC Detection Program Date: Mon, 12 Apr 2010 21:55:45 +0200 Message-ID: <8739z0wim6.fsf@gmx.de> References: <8739z26jxo.fsf@gmx.de> <87iq7weaz4.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1271102265 32521 80.91.229.12 (12 Apr 2010 19:57:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Apr 2010 19:57:45 +0000 (UTC) Cc: tramp-devel@gnu.org, emacs-devel@gnu.org To: Noah Lavine Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 12 21:57:43 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O1PlO-0008R6-8y for ged-emacs-devel@m.gmane.org; Mon, 12 Apr 2010 21:57:42 +0200 Original-Received: from localhost ([127.0.0.1]:49817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1PlN-0006gF-M5 for ged-emacs-devel@m.gmane.org; Mon, 12 Apr 2010 15:57:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1Pjg-0005zA-TQ for emacs-devel@gnu.org; Mon, 12 Apr 2010 15:55:56 -0400 Original-Received: from [140.186.70.92] (port=41904 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1Pjf-0005yK-AZ for emacs-devel@gnu.org; Mon, 12 Apr 2010 15:55:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1Pjd-0005mT-8R for emacs-devel@gnu.org; Mon, 12 Apr 2010 15:55:55 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:60000) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O1Pjc-0005lv-Rp for emacs-devel@gnu.org; Mon, 12 Apr 2010 15:55:53 -0400 Original-Received: (qmail invoked by alias); 12 Apr 2010 19:55:48 -0000 Original-Received: from p4FC00A02.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [79.192.10.2] by mail.gmx.net (mp060) with SMTP; 12 Apr 2010 21:55:48 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18VrLsTc+QVuBcEPi8x93h0hqtHwPJsxvVkYuO8QC R2T7a5fvmPZEwr In-Reply-To: (Noah Lavine's message of "Mon, 12 Apr 2010 15:36:42 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64000000000000001 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123537 Archived-At: Noah Lavine writes: > Hi Michael, Hi Noah, > I checked with my version of ssh, and we would indeed be able to > detect this from its help version string. However, it seems like this > could have similar fragility issues as the version number idea, if the > help string changed format some time. You could solve this by only > trying scpc on help strings that are known to be good, but you could > also have a version number whitelist that would serve the same > purpose. It seems like both of these would work and would be quite > similar - is there a reason to think that one would be better than the > other? I have no bullet-proof reason. But your version test depends on underlying OpenSSH, and its version numbering scheme. What if other ssh implementations will support this option as well? Therefore, the version check seems to be more fragile to me than the "-M" option. Again, it is just a feeling. Another test could be the following: $ ssh -o ControlMaster=auto wrong-host ssh: Could not resolve hostname wrong-host: Name or service not known This would indicate, that the option is supported. Unsupported options return the following error message: $ ssh -o ControlMasterr=auto wrong-host command-line: line 0: Bad configuration option: ControlMasterr > As for the test connection, maybe a change would help. It's probably > not good to try connecting to a known-good host, but what about trying > it with the host that Tramp needs to connect to anyway? You could try > it first with the -ControlMaster option, and if ssh gave an error, > then try again without it and fall back on the other method. This > wouldn't create more ssh connections than necessary. The problem I see > is that it might require a more substantial change to the Tramp > codebase than the other methods, but I don't know, because I haven't > looked around enough to see. Do you think this method would be useful > enough to make it worth looking through the Tramp code more and maybe > making bigger changes? Yes, this would require deeper changes in Tramp's workflow, which I would like to avoid. And it might discriminate users for whom the test fails, because they would *always* need to spend the time for that failed test. > Noah Best regards, Michael.