File 0001-Don-t-make-clients-hang-if-kwallet-is-disabled.patch of Package kf6-kwallet

From c9a9252d34a63bb02a3756bf5e58441a42ad5928 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Thu, 15 May 2025 17:10:38 +0200
Subject: [PATCH] Don't make clients hang if kwallet is disabled

When KWallet/KSecretd is disabled, return with error from main, this makes the caller of the Dbus-activated service not stay hanged and timeout

BUG:504014
---
 src/runtime/ksecretd/main.cpp | 2 +-
 src/runtime/kwalletd/main.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/runtime/ksecretd/main.cpp b/src/runtime/ksecretd/main.cpp
index df668a1d..97dcf3c3 100644
--- a/src/runtime/ksecretd/main.cpp
+++ b/src/runtime/ksecretd/main.cpp
@@ -192,7 +192,7 @@ int main(int argc, char **argv)
         /* Do not keep dbus-daemon waiting for the org.freedesktop.secrets if kwallet is disabled */
         KWalletFreedesktopService(nullptr);
 
-        return (0);
+        return (-1);
     }
 
     KSecretD secretd;
diff --git a/src/runtime/kwalletd/main.cpp b/src/runtime/kwalletd/main.cpp
index 03c9ceaf..0682c7d5 100644
--- a/src/runtime/kwalletd/main.cpp
+++ b/src/runtime/kwalletd/main.cpp
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
     if (!isWalletEnabled()) {
         qCDebug(KWALLETD_LOG) << "kwallet is disabled!";
 
-        return (0);
+        return (-1);
     }
 
     KDBusService dbusUniqueInstance(KDBusService::Unique);
-- 
2.49.0

openSUSE Build Service is sponsored by