Group :: Sistema/Bibliotecas
RPM: kf5-kwallet
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: alt-fix-wallet-format.patch
Download
Download
diff --git a/src/runtime/kwalletd/backend/kwalletbackend.cc b/src/runtime/kwalletd/backend/kwalletbackend.cc
index e58da67..da718c0 100644
--- a/src/runtime/kwalletd/backend/kwalletbackend.cc
+++ b/src/runtime/kwalletd/backend/kwalletbackend.cc
@@ -40,6 +40,7 @@
#define KWALLET_VERSION_MAJOR 0
#define KWALLET_VERSION_MINOR 1
+#define KWALLET_STORE_TIMESTAMPS (1 << 6)
using namespace KWallet;
@@ -364,6 +365,15 @@ int Backend::openInternal(WId w)
return -4; // unknown version
}
+ /* ALT: skip stored timestamps */
+ if (magicBuf[1] & KWALLET_STORE_TIMESTAMPS) {
+ QDataStream in(&db);
+ constexpr int skip_size = sizeof(qulonglong) * 2;
+ if (in.skipRawData(skip_size) != skip_size)
+ return -4;
+ magicBuf[1] = char(magicBuf[1] & ~(KWALLET_STORE_TIMESTAMPS));
+ }
+
//0 has been the MINOR version until 4.13, from that point we use it to upgrade the hash
if (magicBuf[1] == 1) {
qCDebug(KWALLETBACKEND_LOG) << "Wallet new enough, using new hash";