[frameworks/kwallet] src: Drop unused internal pamOpen from kwalletd

Nicolas Fella <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 87a0f734e4846c449df0dc032ae6ec281df9a953 by Nicolas Fella.
Committed on 27/07/2026 at 08:55.
Pushed by nicolasfella into branch 'master'.

Drop unused internal pamOpen from kwalletd

This isn't used by anything, not even kwallet-pam

It also doesn't work across the kwallet->org.freedesktop.secrets bridge

M  +0    -6    src/api/KWallet/org.kde.KWallet.xml
M  +0    -6    src/api/KWallet/org.kde.nodeprecated.KWallet.xml
M  +0    -17   src/runtime/kwalletd/kwalletd.cpp
M  +0    -5    src/runtime/kwalletd/kwalletd.h

https://invent.kde.org/frameworks/kwallet/-/commit/87a0f734e4846c449df0dc032ae6ec281df9a953

diff --git a/src/api/KWallet/org.kde.KWallet.xml b/src/api/KWallet/org.kde.KWallet.xml
index b17ad701..a539fba4 100644
--- a/src/api/KWallet/org.kde.KWallet.xml
+++ b/src/api/KWallet/org.kde.KWallet.xml
@@ -295,11 +295,5 @@
     <method name="localWallet">
       <arg type="s" direction="out"/>
     </method>
-    <method name="pamOpen">
-      <arg name="wallet" type="s" direction="in"/>
-      <arg name="passwordHash" type="ay" direction="in"/>
-      <arg name="sessionTimeout" type="i" direction="in"/>
-      <annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
-    </method>
   </interface>
 </node>
diff --git a/src/api/KWallet/org.kde.nodeprecated.KWallet.xml b/src/api/KWallet/org.kde.nodeprecated.KWallet.xml
index ffc3bd7b..4816be12 100644
--- a/src/api/KWallet/org.kde.nodeprecated.KWallet.xml
+++ b/src/api/KWallet/org.kde.nodeprecated.KWallet.xml
@@ -268,11 +268,5 @@
     <method name="localWallet">
       <arg type="s" direction="out"/>
     </method>
-    <method name="pamOpen">
-      <arg name="wallet" type="s" direction="in"/>
-      <arg name="passwordHash" type="ay" direction="in"/>
-      <arg name="sessionTimeout" type="i" direction="in"/>
-      <annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
-    </method>
   </interface>
 </node>
diff --git a/src/runtime/kwalletd/kwalletd.cpp b/src/runtime/kwalletd/kwalletd.cpp
index 34e896d1..b2e3a566 100644
--- a/src/runtime/kwalletd/kwalletd.cpp
+++ b/src/runtime/kwalletd/kwalletd.cpp
@@ -1115,21 +1115,4 @@ QString KWalletD::localWallet()
     return walletGroup.readEntry(QStringLiteral("Local Wallet"), networkWallet());
 }
 
-int KWalletD::pamOpen(const QString &wallet, const QByteArray &passwordHash, int sessionTimeout)
-{
-    if (!m_backend->useKSecretBackend()) {
-        return -1;
-    }
-
-    QDBusInterface secretdInterface(QStringLiteral("org.kde.ksecretd"),
-                                    QStringLiteral("/ksecretd"),
-                                    QStringLiteral("org.kde.KWallet"),
-                                    QDBusConnection::sessionBus());
-
-    secretdInterface.call(QStringLiteral("pamOpen"), wallet, passwordHash, sessionTimeout);
-
-    // Return value is not much important as is not exposed on dbus
-    return 0;
-}
-
 #include "moc_kwalletd.cpp"
diff --git a/src/runtime/kwalletd/kwalletd.h b/src/runtime/kwalletd/kwalletd.h
index 965d0653..52a5820d 100644
--- a/src/runtime/kwalletd/kwalletd.h
+++ b/src/runtime/kwalletd/kwalletd.h
@@ -146,11 +146,6 @@ public Q_SLOTS:
     QString networkWallet();
     QString localWallet();
 
-    // STUB: Open a wallet using a pre-hashed password. This is only useful in cooperation
-    // with the kwallet PAM module. It's also less secure than manually entering the
-    // password as the password hash is transmitted using D-Bus.
-    int pamOpen(const QString &wallet, const QByteArray &passwordHash, int sessionTimeout);
-
 protected:
     int openInternal(const QString &wallet, qlonglong wId, const QString &appId);
     // Migrate a single wallet, returns true on success
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.