Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37042384
en ru br
ALT Linux repositórios
S:5.110.0-alt1

Group :: Sistema/Bibliotecas
RPM: kf5-kwallet

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: alt-fix-wallet-format.patch
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";
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009