Hello community, here is the log from the commit of package kwallet for openSUSE:Factory checked in at 2015-02-20 12:01:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kwallet (Old) and /work/SRC/openSUSE:Factory/.kwallet.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kwallet" Changes: -------- --- /work/SRC/openSUSE:Factory/kwallet/kwallet.changes 2015-02-16 17:32:43.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kwallet.new/kwallet.changes 2015-02-20 12:01:26.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Feb 18 01:48:33 UTC 2015 - hrvoje.senjan@gmail.com + +- Added 0001-Retrofitting-the-fix-for-a-bug-found-in-Applications.patch + (kde#343718) + +------------------------------------------------------------------- New: ---- 0001-Retrofitting-the-fix-for-a-bug-found-in-Applications.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kwallet.spec ++++++ --- /var/tmp/diff_new_pack.XVce1s/_old 2015-02-20 12:01:27.000000000 +0100 +++ /var/tmp/diff_new_pack.XVce1s/_new 2015-02-20 12:01:27.000000000 +0100 @@ -45,6 +45,8 @@ Url: http://www.kde.org Source: http://download.kde.org/stable/frameworks/%{_tar_path}/kwallet-%{version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM 0001-Retrofitting-the-fix-for-a-bug-found-in-Applications.patch +Patch0: 0001-Retrofitting-the-fix-for-a-bug-found-in-Applications.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -102,6 +104,7 @@ %lang_package -n kwalletd5 %prep %setup -q +%patch0 -p1 %build %cmake_kf5 -d build ++++++ 0001-Retrofitting-the-fix-for-a-bug-found-in-Applications.patch ++++++
From d14b2da6fe4d4ed415c6a8f2361ce4e5fc685d2d Mon Sep 17 00:00:00 2001 From: Valentin Rusu <kde@rusu.info> Date: Tue, 17 Feb 2015 22:45:03 +0100 Subject: [PATCH 1/1] Retrofitting the fix for a bug found in Applications/14.12
Commit 345e36a8b35 from Applications/14.12 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 --- .../kwalletd/backend/backendpersisthandler.cpp | 31 +++++----------------- src/runtime/kwalletd/backend/kwalletbackend.cc | 5 +++- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/src/runtime/kwalletd/backend/backendpersisthandler.cpp b/src/runtime/kwalletd/backend/backendpersisthandler.cpp index d98980dafc14bb06a8397e925b83d6e693365b25..8795f77b8c3875bcccb52418d82d7f362e769db8 100644 --- a/src/runtime/kwalletd/backend/backendpersisthandler.cpp +++ b/src/runtime/kwalletd/backend/backendpersisthandler.cpp @@ -155,25 +155,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); @@ -185,22 +174,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/src/runtime/kwalletd/backend/kwalletbackend.cc b/src/runtime/kwalletd/backend/kwalletbackend.cc index e95866c01e3dfd007240119515221c45a1bddd8d..34e0419ea8c5cdedad40aee2cf05feebbfd00be9 100644 --- a/src/runtime/kwalletd/backend/kwalletbackend.cc +++ b/src/runtime/kwalletd/backend/kwalletbackend.cc @@ -374,7 +374,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() @@ -456,6 +458,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; } -- 2.2.2 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org