summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2015-06-22 14:55:08 +0000
committerJohannes Huber <johu@gentoo.org>2015-06-22 14:55:08 +0000
commit0cca6061f49aace9d052f1f13a8f188614ba5d5f (patch)
tree90e339b05fc32f4fb782bf8d47c313b3e769178a /kde-apps
parentVersion bump fixing bug #541128 in the process. Add myself as a maintainer. (diff)
downloadgentoo-2-0cca6061f49aace9d052f1f13a8f188614ba5d5f.tar.gz
gentoo-2-0cca6061f49aace9d052f1f13a8f188614ba5d5f.tar.bz2
gentoo-2-0cca6061f49aace9d052f1f13a8f188614ba5d5f.zip
Revision bump adds upstream patch, bug #540790.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xFDF4F788)
Diffstat (limited to 'kde-apps')
-rw-r--r--kde-apps/kwalletd/ChangeLog10
-rw-r--r--kde-apps/kwalletd/files/kwalletd-4.14.3-fix-random-open.patch152
-rw-r--r--kde-apps/kwalletd/kwalletd-4.14.3-r2.ebuild37
3 files changed, 197 insertions, 2 deletions
diff --git a/kde-apps/kwalletd/ChangeLog b/kde-apps/kwalletd/ChangeLog
index 83b7399b0d57..369167d79631 100644
--- a/kde-apps/kwalletd/ChangeLog
+++ b/kde-apps/kwalletd/ChangeLog
@@ -1,6 +1,12 @@
-# ChangeLog for kde-base/kwalletd
+# ChangeLog for kde-apps/kwalletd
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-apps/kwalletd/ChangeLog,v 1.1 2015/06/04 18:44:42 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-apps/kwalletd/ChangeLog,v 1.2 2015/06/22 14:55:08 johu Exp $
+
+*kwalletd-4.14.3-r2 (22 Jun 2015)
+
+ 22 Jun 2015; Johannes Huber <johu@gentoo.org>
+ +files/kwalletd-4.14.3-fix-random-open.patch, +kwalletd-4.14.3-r2.ebuild:
+ Revision bump adds upstream patch, bug #540790.
18 Feb 2015; Johannes Huber <johu@gentoo.org> -kwalletd-4.14.3.ebuild:
Remove old, bug #496768
diff --git a/kde-apps/kwalletd/files/kwalletd-4.14.3-fix-random-open.patch b/kde-apps/kwalletd/files/kwalletd-4.14.3-fix-random-open.patch
new file mode 100644
index 000000000000..7443e3f6cc29
--- /dev/null
+++ b/kde-apps/kwalletd/files/kwalletd-4.14.3-fix-random-open.patch
@@ -0,0 +1,152 @@
+commit 33a17ba0104cd94f2e33a3ac007b300553cdb417
+Author: Valentin Rusu <kde@rusu.info>
+Date: Mon Feb 16 22:44:07 2015 +0100
+
+ Fix for the random wallet open failure when updating
+
+ The problem seems to be caused by the use of BackendPersistHandler
+ singleton when the user has several wallets on his system and not
+ all of them have been updated to the new schema.
+
+ BUG: 343718
+
+diff --git a/kwalletd/backend/backendpersisthandler.cpp b/kwalletd/backend/backendpersisthandler.cpp
+index 5c321c9..b7f63f8 100644
+--- a/kwalletd/backend/backendpersisthandler.cpp
++++ b/kwalletd/backend/backendpersisthandler.cpp
+@@ -140,25 +140,14 @@ static int getRandomBlock(QByteArray& randBlock) {
+ #endif
+ }
+
+-
+-
+-static BlowfishPersistHandler *blowfishHandler =0;
+-#ifdef HAVE_QGPGME
+-static GpgPersistHandler *gpgHandler =0;
+-#endif // HAVE_QGPGME
+-
+ BackendPersistHandler *BackendPersistHandler::getPersistHandler(BackendCipherType cipherType)
+ {
+ switch (cipherType){
+ case BACKEND_CIPHER_BLOWFISH:
+- if (0 == blowfishHandler)
+- blowfishHandler = new BlowfishPersistHandler;
+- return blowfishHandler;
++ return new BlowfishPersistHandler;
+ #ifdef HAVE_QGPGME
+ case BACKEND_CIPHER_GPG:
+- if (0 == gpgHandler)
+- gpgHandler = new GpgPersistHandler;
+- return gpgHandler;
++ return new GpgPersistHandler;
+ #endif // HAVE_QGPGME
+ default:
+ Q_ASSERT(0);
+@@ -170,21 +159,16 @@ BackendPersistHandler *BackendPersistHandler::getPersistHandler(char magicBuf[12
+ {
+ if ((magicBuf[2] == KWALLET_CIPHER_BLOWFISH_ECB || magicBuf[2] == KWALLET_CIPHER_BLOWFISH_CBC) &&
+ (magicBuf[3] == KWALLET_HASH_SHA1 || magicBuf[3] == KWALLET_HASH_PBKDF2_SHA512)) {
+- if (0 == blowfishHandler) {
+- bool useECBforReading = magicBuf[2] == KWALLET_CIPHER_BLOWFISH_ECB;
+- if (useECBforReading) {
+- qDebug() << "this wallet uses ECB encryption. It'll be converted to CBC on next save.";
+- }
+- blowfishHandler = new BlowfishPersistHandler(useECBforReading);
++ bool useECBforReading = magicBuf[2] == KWALLET_CIPHER_BLOWFISH_ECB;
++ if (useECBforReading) {
++ qDebug() << "this wallet uses ECB encryption. It'll be converted to CBC on next save.";
+ }
+- return blowfishHandler;
++ return new BlowfishPersistHandler(useECBforReading);
+ }
+ #ifdef HAVE_QGPGME
+ if (magicBuf[2] == KWALLET_CIPHER_GPG &&
+ magicBuf[3] == 0) {
+- if (0 == gpgHandler)
+- gpgHandler = new GpgPersistHandler;
+- return gpgHandler;
++ return new GpgPersistHandler;
+ }
+ #endif // HAVE_QGPGME
+ return 0; // unknown cipher or hash
+diff --git a/kwalletd/backend/kwalletbackend.cc b/kwalletd/backend/kwalletbackend.cc
+index 7d439e3..9240103 100644
+--- a/kwalletd/backend/kwalletbackend.cc
++++ b/kwalletd/backend/kwalletbackend.cc
+@@ -266,7 +266,7 @@ int Backend::open(const QByteArray& password, WId w) {
+ if (_open) {
+ return -255; // already open
+ }
+-
++
+ setPassword(password);
+ return openInternal(w);
+ }
+@@ -287,20 +287,20 @@ int Backend::openPreHashed(const QByteArray &passwordHash)
+ if (_open) {
+ return -255; // already open
+ }
+-
++
+ // check the password hash for correct size (currently fixed)
+ if (passwordHash.size() != 20 && passwordHash.size() != 40 &&
+ passwordHash.size() != 56) {
+ return -42; // unsupported encryption scheme
+ }
+-
++
+ _passhash = passwordHash;
+ _newPassHash = passwordHash;
+ _useNewHash = true;//Only new hash is supported
+
+ return openInternal();
+ }
+-
++
+ int Backend::openInternal(WId w)
+ {
+ // No wallet existed. Let's create it.
+@@ -350,7 +350,9 @@ int Backend::openInternal(WId w)
+ if (0 == phandler){
+ return 42; // unknown cipher or hash
+ }
+- return phandler->read(this, db, w);
++ int result = phandler->read(this, db, w);
++ delete phandler;
++ return result;
+ }
+
+ void Backend::swapToNewHash()
+@@ -427,6 +429,7 @@ int Backend::sync(WId w) {
+ notification->setText( i18n("Failed to sync wallet <b>%1</b> to disk. Error codes are:\nRC <b>%2</b>\nSF <b>%3</b>. Please file a BUG report using this information to bugs.kde.org").arg(_name).arg(rc).arg(sf.errorString()) );
+ notification->sendEvent();
+ }
++ delete phandler;
+ return rc;
+ }
+
+@@ -439,7 +442,7 @@ int Backend::close(bool save) {
+ return rc;
+ }
+ }
+-
++
+ // do the actual close
+ for (FolderMap::ConstIterator i = _entries.constBegin(); i != _entries.constEnd(); ++i) {
+ for (EntryMap::ConstIterator j = i.value().constBegin(); j != i.value().constEnd(); ++j) {
+@@ -447,13 +450,13 @@ int Backend::close(bool save) {
+ }
+ }
+ _entries.clear();
+-
++
+ // empty the password hash
+ _passhash.fill(0);
+ _newPassHash.fill(0);
+
+ _open = false;
+-
++
+ return 0;
+ }
+
diff --git a/kde-apps/kwalletd/kwalletd-4.14.3-r2.ebuild b/kde-apps/kwalletd/kwalletd-4.14.3-r2.ebuild
new file mode 100644
index 000000000000..34d1b338c229
--- /dev/null
+++ b/kde-apps/kwalletd/kwalletd-4.14.3-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-apps/kwalletd/kwalletd-4.14.3-r2.ebuild,v 1.1 2015/06/22 14:55:08 johu Exp $
+
+EAPI=5
+
+KMNAME="kde-runtime"
+inherit kde4-meta
+
+DESCRIPTION="KDE Password Server"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug gpg"
+
+DEPEND="
+ gpg? (
+ app-crypt/gpgme
+ $(add_kdebase_dep kdepimlibs)
+ )
+"
+RDEPEND="${DEPEND}"
+
+RESTRICT="test"
+# testpamopen crashes with a buffer overflow (__fortify_fail)
+
+PATCHES=(
+ "${FILESDIR}/${P}-CVE-2013-7252.patch"
+ "${FILESDIR}/${P}-fix-random-open.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package gpg Gpgme)
+ $(cmake-utils_use_find_package gpg QGpgme)
+ )
+
+ kde4-base_src_configure
+}