emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCPC Detection Program


From: Michael Albinus
Subject: Re: SCPC Detection Program
Date: Mon, 12 Apr 2010 21:55:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Noah Lavine <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]