summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hüttel <dilfridge@gentoo.org>2011-08-27 22:07:04 +0000
committerAndreas Hüttel <dilfridge@gentoo.org>2011-08-27 22:07:04 +0000
commit808252abec351fb96f499b797397ce99868b34aa (patch)
tree9b9e42786764813d3d4662fb2fed275849efa7f5 /kde-base
parentMake CONFIG check for EXPORTFS matadory for USE=nfs (diff)
downloadhistorical-808252abec351fb96f499b797397ce99868b34aa.tar.gz
historical-808252abec351fb96f499b797397ce99868b34aa.tar.bz2
historical-808252abec351fb96f499b797397ce99868b34aa.zip
Add upstream patch to fix sftp authentication, bug 380707
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/kdebase-kioslaves/ChangeLog9
-rw-r--r--kde-base/kdebase-kioslaves/Manifest22
-rw-r--r--kde-base/kdebase-kioslaves/files/kdebase-kioslaves-4.7.0-sftp.patch169
-rw-r--r--kde-base/kdebase-kioslaves/kdebase-kioslaves-4.7.0-r1.ebuild53
4 files changed, 247 insertions, 6 deletions
diff --git a/kde-base/kdebase-kioslaves/ChangeLog b/kde-base/kdebase-kioslaves/ChangeLog
index bac5f9fbd5ac..39e4723aa977 100644
--- a/kde-base/kdebase-kioslaves/ChangeLog
+++ b/kde-base/kdebase-kioslaves/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for kde-base/kdebase-kioslaves
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-kioslaves/ChangeLog,v 1.231 2011/08/15 20:51:32 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-kioslaves/ChangeLog,v 1.232 2011/08/27 22:07:04 dilfridge Exp $
+
+*kdebase-kioslaves-4.7.0-r1 (27 Aug 2011)
+
+ 27 Aug 2011; Andreas K. Huettel <dilfridge@gentoo.org>
+ +kdebase-kioslaves-4.7.0-r1.ebuild,
+ +files/kdebase-kioslaves-4.7.0-sftp.patch:
+ Add upstream patch to fix sftp authentication, bug 380707
15 Aug 2011; Markus Meier <maekke@gentoo.org> kdebase-kioslaves-4.6.5.ebuild:
x86 stable, bug #377465
diff --git a/kde-base/kdebase-kioslaves/Manifest b/kde-base/kdebase-kioslaves/Manifest
index 910390fc83a6..4707cc4b6f89 100644
--- a/kde-base/kdebase-kioslaves/Manifest
+++ b/kde-base/kdebase-kioslaves/Manifest
@@ -1,19 +1,31 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA512
AUX kdebase-kioslaves-4.6.4-nfs.patch 642 RMD160 1a6b54cf017dd62d068c19104439e8c948e90868 SHA1 78d4da46eb52141248a23e510c5c882d0af80fc7 SHA256 13f69947b1b5583655558e9c5111eeb80ccf89d896ddb69b05e17c9586c73cd4
+AUX kdebase-kioslaves-4.7.0-sftp.patch 5311 RMD160 4c672957694fa0903980d863a6f27161b88e5263 SHA1 dd2308a28d9052b8002d6d2736ae6f33a6904e17 SHA256 59b22945371efb7f7bee307c25a5c02b930faf03134b8cc0735260f3bbd348f8
DIST kde-runtime-4.7.0.tar.bz2 5990533 RMD160 80ad75e71031cd164cbb2837b2a4ba6c6cd5f62d SHA1 79c9b8323368f1a2a9b03830bd9ae02b2b20482b SHA256 7cf4dca64b1006e8fb14ee9bd683ce23c39f9d76f2f1ceb65a394024270ca9f2
DIST kdebase-runtime-4.6.3.tar.bz2 5835360 RMD160 db9af784d718c26ae380b220d089cf2a84126082 SHA1 75cf1993b42cbada44b8c3ca2d5b99e6ac48594c SHA256 96418d3bce773b96bd5594e92f8f45e05131090c9afa93a7588e1739b86f1598
DIST kdebase-runtime-4.6.5.tar.bz2 5828482 RMD160 2b7f997b0d1c312d09ff6a968b265332c43dd51a SHA1 e91d35af2a916259305cc7efc2f3a3fbc8b22def SHA256 0ad4ae1139005e3bc0cab6357f366575465fb37828762aff658483e6ddf466e2
EBUILD kdebase-kioslaves-4.6.3.ebuild 1342 RMD160 865e41d0497bca152b1acf18f4cedf8c09bffc61 SHA1 1ac661c8346558b451c95484b321427fbd822e2c SHA256 30a3f9e9f2ef85b4ce3c88ecd89c2a06a6ce7ad2ad5207f55ca0ed06ecec1fb3
EBUILD kdebase-kioslaves-4.6.5.ebuild 1392 RMD160 5c60764bd181acc8d7c64ed23a2d868372cb7a2a SHA1 0c487ce55bee7c9ef767437972b6c5bab4e98b27 SHA256 71e93c03e369a3a406c467448fb0c8db51b8ba08dd99afb5a1f50615f2b2f51d
+EBUILD kdebase-kioslaves-4.7.0-r1.ebuild 1390 RMD160 7313b50ede6f0a4252623429a3e142f10babb0cf SHA1 046b36ec8f389398f3b639c0ff6ccf23eb34bc7e SHA256 5945439141608a2f2c9fbfb58a1c5e9dbfc0a87cf0110624d6c7e11f26ed5f4f
EBUILD kdebase-kioslaves-4.7.0.ebuild 1341 RMD160 9d871da10878c45fea8c99b0a5d0c89df9c14552 SHA1 1667c193b4a6b18f46518bdfd0f0e142832fd487 SHA256 5fdbe0578bb7c407a3f6a702bdbefd28e2521e8ae52eddd1f50214e6dfef05e3
-MISC ChangeLog 33366 RMD160 558fffa2f2d57308b7456f8cc61b79d53a57a765 SHA1 16e253162b356037825069536503a02b7e736fe2 SHA256 c01f4cc23d45d7b4227e7cf7429d7e35e79e54ec8735106e915e1f1f78916e1b
+MISC ChangeLog 33613 RMD160 2f3fe50f010c71b7c7dc38d597cd470e995d4fa6 SHA1 f95a1905beac2b8eaba7c2ab59c8a6cbb35e1a41 SHA256 8d286ff9e96f133b9e117396c04708388c2d7494bc1a05ed40c0182a9df2c3a3
MISC metadata.xml 257 RMD160 c3d8e831fca8121181dfd47f4bf10b91c4b41658 SHA1 153ca48c830db30d6c39e9cd5dd39d23d7e87331 SHA256 1d6b1fefc7cad1cf2b72338e3bb02748bedcd90518c489af24d61f7c97be6304
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk5JhwMACgkQkKaRLQcq0GIdVwCfV2vDbJCW9l1r29irpwc5kvlm
-zYkAnj4Ka5lrtGsTjxrdx0HbXnQoOW1N
-=oO35
+iQIcBAEBCgAGBQJOWWqbAAoJENwGBM22xffeUckP/RRnYudU5HQ89Y3Q3t5Dt+nD
+cBJGmkNjra9WY8w0bV1oxgcBh4H9QaueAuupABSWISdilZ7jgsy6RAzAeswmeS9C
+D9iij2Zo6LDy2zMLPRxMGrXFpL63IsB494pFmN9YxL55+P1JgSs/2x8kxUV3RnNx
+E8UktIet16h2b9Sr8rmSJ0tbao1vUbNMLXV+UrcSDFP3VkzgcrdpwVP4SNS5bJ2R
+lVe2FrHhKLqEMUVfzLbNjzkFSFQrUbG2UH0uE+CA3u9Ke4Drd1LY52lVpYIa7Ph1
+i4q1No7i57Ih7ZcF3Dae195IJkj2hkePec2oyBrOFgV6u6OKRivShaeYS159+3TH
+oQ36I6ZTbIvFcABQs7npEzYCN0Api/tuyanmrIYVdj3KcbpK5kQzUcJ2SzX+NmUI
+Q8sY0Or4gZdHb//SrL8zL6xJb2Gb7ib1m5klROlCgvjh1nPkKhk5JcQBxs8RW/6e
+8a2VmO5rik/yLWycsLO9YDA0+Ykpa9tc/uh40H7uyoiR2hr6904w3pxoJB1J3M53
+upZ7jn19VOjhgARPHfWQUwAVE5FHNWvCL4+3pdyV1m6VbxUnZ8XRLFMUcnMIlgLE
+ncdoBVK47hElqt0eSrXRFxLMLmtq8UPJFM8fRok5QzYsw7RpNsRLwkTp1khm+cNa
+ngSOOFmQloAQav0K1i5g
+=m7Rb
-----END PGP SIGNATURE-----
diff --git a/kde-base/kdebase-kioslaves/files/kdebase-kioslaves-4.7.0-sftp.patch b/kde-base/kdebase-kioslaves/files/kdebase-kioslaves-4.7.0-sftp.patch
new file mode 100644
index 000000000000..a9843295fdf5
--- /dev/null
+++ b/kde-base/kdebase-kioslaves/files/kdebase-kioslaves-4.7.0-sftp.patch
@@ -0,0 +1,169 @@
+commit 23e4ab03091e9d824e78171ea92a2da2326256d8
+Author: Dawit Alemayehu <adawit@kde.org>
+Date: Thu Aug 25 00:29:14 2011 -0400
+
+ Fix the logic for user name change redirection so it won't break normal
+ login into sftp servers.
+
+diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
+index eb5c8a8..2a55ff9 100644
+--- a/kioslave/sftp/kio_sftp.cpp
++++ b/kioslave/sftp/kio_sftp.cpp
+@@ -429,12 +429,11 @@ sftpProtocol::~sftpProtocol() {
+ }
+
+ void sftpProtocol::setHost(const QString& host, quint16 port, const QString& user, const QString& pass) {
+- kDebug(KIO_SFTP_DB) << "setHost(): " << user << "@" << host << ":" << port;
++ kDebug(KIO_SFTP_DB) << user << "@" << host << ":" << port;
+
+ // Close connection if the request is to another server...
+- if (mConnected &&
+- (host != mHost || port != mPort ||
+- user != mUsername || pass != mPassword)) {
++ if (host != mHost || port != mPort ||
++ user != mUsername || pass != mPassword) {
+ closeConnection();
+ }
+
+@@ -451,9 +450,7 @@ void sftpProtocol::setHost(const QString& host, quint16 port, const QString& use
+ }
+ }
+
+- kDebug(KIO_SFTP_DB) << "setHost(): mPort=" << mPort;
+-
+- mUsername = mOrigUsername = user;
++ mUsername = user;
+ mPassword = pass;
+ }
+
+@@ -479,6 +476,7 @@ void sftpProtocol::openConnection() {
+ info.url.setPort(mPort);
+ info.url.setUser(mUsername);
+ info.username = mUsername;
++ const QString origPasswd (mPassword);
+
+ // Check for cached authentication info if no password is specified...
+ if (mPassword.isEmpty()) {
+@@ -497,6 +495,7 @@ void sftpProtocol::openConnection() {
+ int rc, state, hlen;
+ int timeout_sec = 30, timeout_usec = 0;
+
++login_start:
+ mSession = ssh_new();
+ if (mSession == NULL) {
+ error(KIO::ERR_INTERNAL, i18n("Could not create a new SSH session."));
+@@ -722,8 +721,12 @@ void sftpProtocol::openConnection() {
+ firstTime = false;
+
+ if (!mUsername.isEmpty() && mUsername != info.username) {
+- info.url.setUser(info.username); // update the AuthInfo URL's username
+ kDebug(KIO_SFTP_DB) << "Username changed from" << mUsername << "to" << info.username;
++ info.url.setUser(info.username);
++ mUsername = info.username;
++ mPassword = info.password;
++ closeConnection();
++ goto login_start;
+ }
+ }
+
+@@ -770,6 +773,7 @@ void sftpProtocol::openConnection() {
+ setTimeoutSpecialCommand(KIO_SFTP_SPECIAL_TIMEOUT);
+
+ mConnected = true;
++ mPassword = origPasswd;
+ connected();
+
+ info.password.fill('x');
+@@ -777,13 +781,17 @@ void sftpProtocol::openConnection() {
+ }
+
+ void sftpProtocol::closeConnection() {
+- kDebug(KIO_SFTP_DB) << "closeConnection()";
++ kDebug(KIO_SFTP_DB);
+
+- sftp_free(mSftp);
+- mSftp = NULL;
++ if (mSftp) {
++ sftp_free(mSftp);
++ mSftp = NULL;
++ }
+
+- ssh_disconnect(mSession);
+- mSession = NULL;
++ if (mSession) {
++ ssh_disconnect(mSession);
++ mSession = NULL;
++ }
+
+ mConnected = false;
+ }
+@@ -1824,28 +1832,28 @@ sftpProtocol::GetRequest::~GetRequest() {
+ sftp_attributes_free(mSb);
+ }
+
+-bool sftpProtocol::requiresUserNameRedirection()
++void sftpProtocol::requiresUserNameRedirection()
+ {
+- kDebug(KIO_SFTP_DB) << "Connected ?" << mConnected << "Original:" << mOrigUsername << "Current:" << mUsername;
+- if (!mConnected || mOrigUsername.isEmpty() || mOrigUsername == mUsername)
+- return false;
+-
+- KUrl realURL;
+- realURL.setProtocol( QLatin1String("sftp") );
+- realURL.setUser( mUsername );
+- realURL.setPass( mPassword );
+- realURL.setHost( mHost );
+- if ( mPort > 0)
+- realURL.setPort( mPort );
+- kDebug(KIO_SFTP_DB) << "User name changed! Redirecting to" << realURL.prettyUrl();
+- redirection( realURL );
+- finished();
+- mOrigUsername = mUsername;
+- return true;
++ KUrl redirectUrl;
++ redirectUrl.setProtocol( QLatin1String("sftp") );
++ redirectUrl.setUser( mUsername );
++ redirectUrl.setPass( mPassword );
++ redirectUrl.setHost( mHost );
++ if (mPort > 0)
++ redirectUrl.setPort( mPort );
++ kDebug(KIO_SFTP_DB) << "redirecting to" << redirectUrl;
++ redirection( redirectUrl );
+ }
+
+ bool sftpProtocol::sftpConnect()
+ {
++ const QString origUsername = mUsername;
+ openConnection();
+- return !requiresUserNameRedirection();
++ kDebug(KIO_SFTP_DB) << "connected ?" << mConnected << "username: old=" << origUsername << "new=" << mUsername;
++ if (!origUsername.isEmpty() && origUsername != mUsername) {
++ requiresUserNameRedirection();
++ finished();
++ return false;
++ }
++ return true;
+ }
+diff --git a/kioslave/sftp/kio_sftp.h b/kioslave/sftp/kio_sftp.h
+index 7cd16d1..c937e2e 100644
+--- a/kioslave/sftp/kio_sftp.h
++++ b/kioslave/sftp/kio_sftp.h
+@@ -101,9 +101,6 @@ private: // Private variables
+ /** The sftp session for the connection */
+ sftp_session mSftp;
+
+- /** Username originally set when setHost was called. */
+- QString mOrigUsername;
+-
+ /** Username to use when connecting */
+ QString mUsername;
+
+@@ -194,7 +191,7 @@ private: // private methods
+ KIO::UDSEntry &entry, short int details);
+
+ QString canonicalizePath(const QString &path);
+- bool requiresUserNameRedirection();
++ void requiresUserNameRedirection();
+ bool sftpConnect();
+ };
+
diff --git a/kde-base/kdebase-kioslaves/kdebase-kioslaves-4.7.0-r1.ebuild b/kde-base/kdebase-kioslaves/kdebase-kioslaves-4.7.0-r1.ebuild
new file mode 100644
index 000000000000..6f964a78be11
--- /dev/null
+++ b/kde-base/kdebase-kioslaves/kdebase-kioslaves-4.7.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-kioslaves/kdebase-kioslaves-4.7.0-r1.ebuild,v 1.1 2011/08/27 22:07:04 dilfridge Exp $
+
+EAPI=4
+
+KDE_HANDBOOK="optional"
+KMNAME="kde-runtime"
+KMMODULE="kioslave"
+inherit kde4-meta
+
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+DESCRIPTION="kioslave: the kde VFS framework - kioslave plugins present a filesystem-like view of arbitrary data"
+IUSE="+bzip2 exif debug lzma openexr samba +sftp"
+
+# tests hang, last checked for 4.2.96
+RESTRICT="test"
+
+DEPEND="
+ !aqua? ( x11-libs/libXcursor )
+ bzip2? ( app-arch/bzip2 )
+ exif? ( media-gfx/exiv2 )
+ lzma? ( app-arch/xz-utils )
+ openexr? ( media-libs/openexr )
+ samba? ( net-fs/samba[smbclient] )
+ sftp? ( >=net-libs/libssh-0.4.0[sftp] )
+"
+RDEPEND="${DEPEND}
+ $(add_kdebase_dep kdelibs 'bzip2?,lzma?')
+ $(add_kdebase_dep kdialog)
+ virtual/ssh
+ !aqua? ( !kernel_SunOS? ( virtual/eject ) )
+"
+
+PATCHES=( "${FILESDIR}/${P}-sftp.patch" )
+
+KMEXTRA="
+ kioexec
+ kdeeject
+"
+
+src_configure() {
+ mycmakeargs=(
+ -DWITH_SLP=OFF
+ $(cmake-utils_use_with bzip2 BZip2)
+ $(cmake-utils_use_with exif Exiv2)
+ $(cmake-utils_use_with lzma LibLZMA)
+ $(cmake-utils_use_with openexr OpenEXR)
+ $(cmake-utils_use_with samba)
+ $(cmake-utils_use_with sftp LibSSH)
+ )
+ kde4-meta_src_configure
+}