summaryrefslogtreecommitdiffstats
path: root/redhat/kdebase/kdebase-3.5.13-fix_kio_sftp_nonstandard_ports.patch
blob: 00d3eea504422ab5fefc42b1dcf3c0ebb63c6231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
commit 073dc86aceaa060597d7653747c3c6c14d0ed59d
Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
Date:   1335311121 -0500

    Fix sftp when nonstandard port is specified in ssh config

diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
index 2316c8c..04a2b33 100644
--- a/kioslave/sftp/kio_sftp.cpp
+++ b/kioslave/sftp/kio_sftp.cpp
@@ -481,11 +481,7 @@ void sftpProtocol::setHost (const TQString& h, int port, const TQString& user, c
     if( port > 0 )
         mPort = port;
     else {
-        struct servent *pse;
-        if( (pse = getservbyname("ssh", "tcp") ) == NULL )
-            mPort = 22;
-        else
-            mPort = ntohs(pse->s_port);
+        mPort = -1;
     }
 
     mUsername = user;