trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: April 2012

Re: [trinity-devel] ALMOST (not reading .ssh/config) [was Re: [trinity-devel] sftp-kio - still fails in R14 - Any progress? (log captured - may help?)]

From: "David C. Rankin" <drankinatty@...>
Date: Mon, 23 Apr 2012 19:27:00 -0500
On 04/23/2012 06:50 PM, David C. Rankin wrote:
> On 04/23/2012 03:26 PM, David C. Rankin wrote:
>> On 04/23/2012 02:44 AM, Timothy Pearson wrote:
>>> Fixed (hacked around) in GIT hash e72f492.  Basically select() no longer
>>> works on newer systems (could be due to a malfunction of some kind, but it
>>> doesn't really matter), so instead of busywaiting on select(), newer
>>> systems will busywait on read().
>>>
>>> Tim
>>>
>>
>> WOHOO!!! Will test and report back. Sorry, I've been swamped the past couple of
>> days. I'll definitely try and build/test tonight!
> 
> Tim,
> 
>   I built tdelibs and tdebase and tested sftp. There is GOOD news and BAD news.
> The good new - I can connect with sftp!! The bad news - the kio is not reading
> host/port information from ~/.ssh/config. This requires that you manually
> specify a port (if not 22) where sftp:// used to read this information from the
> HOST/PORT information contained in ~/.ssh/config. Eg:
> 
> Host arete.3111skyline.com arete
> Port 6629
> Host fax.rlfpllc.com fax
> Port 6631
> 
>   I don't know what reads this file, but it is read currently when fish:// is
> invoked and it was previously read by sftp:// before this bug appeared. Any idea
> where this occurs?
> 

Tim,

  It looks like the port is set in kio_sftp.cpp:

    if( port > 0 )
        mPort = port;
    else {
        struct servent *pse;
        if( (pse = getservbyname("ssh", "tcp") ) == NULL )
            mPort = 22;
        else
            mPort = ntohs(pse->s_port);
    }

  I have looked at the man pages for both getservbyname and ntohs. For the port
to fail, it looks like the pse->s_port byte order port number returned by
getservbyname must be mucked up also. I'm not sure about the remainder of what
the man page is telling me. Are you familiar with what should be returned? Is
there something I can test for you so we can check if the port is being set?

  A patch to make it spit the port number to kdialog? How to do this?

-- 
David C. Rankin, J.D.,P.E.