1
0
Luca Beltrame 2024-02-23 20:08:44 +00:00 committed by Git OBS Bridge
commit 50598f3735
8 changed files with 322 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,169 @@
From cadbae12c08d7031c83a7af04bed4b8f8a517382 Mon Sep 17 00:00:00 2001
From: Christophe Marin <christophe@krop.fr>
Date: Thu, 15 Feb 2024 19:16:54 +0100
Subject: [PATCH] Don't require password when changing settings
See https://bugzilla.suse.com/show_bug.cgi?id=1217190
The kauth helper is useless and doesn't improve security.
---
CMakeLists.txt | 8 ++++----
src/CMakeLists.txt | 4 ++--
src/konfigurator/CMakeLists.txt | 32 ++++++++++++++++---------------
src/konfigurator/konfigurator.cpp | 29 ----------------------------
src/konfigurator/konfigurator.h | 1 -
5 files changed, 23 insertions(+), 51 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f11288..9530f2d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,10 +32,10 @@ ecm_setup_version(${RELEASE_SERVICE_VERSION} VARIABLE_PREFIX KWALLETMANAGER
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/kwalletmanager_version.h"
)
-option(ENABLE_KAUTH "Enable KAuth support (Disabled for Flatpak builds)" ON)
-if (ENABLE_KAUTH)
- find_package(KF6 ${KF_MIN_VERSION} REQUIRED Auth)
-endif()
+# option(ENABLE_KAUTH "Enable KAuth support (Disabled for Flatpak builds)" ON)
+# if (ENABLE_KAUTH)
+# find_package(KF6 ${KF_MIN_VERSION} REQUIRED Auth)
+# endif()
find_package(KF6 ${KF_MIN_VERSION} REQUIRED
Archive
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 69ff480..4281c9a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (ENABLE_KAUTH)
+# if (ENABLE_KAUTH)
add_subdirectory(konfigurator)
-endif()
+# endif()
add_subdirectory(manager)
diff --git a/src/konfigurator/CMakeLists.txt b/src/konfigurator/CMakeLists.txt
index cba7512..778ebcd 100644
--- a/src/konfigurator/CMakeLists.txt
+++ b/src/konfigurator/CMakeLists.txt
@@ -10,7 +10,6 @@ ki18n_wrap_ui(kcm_kwallet5 walletconfigwidget.ui )
target_link_libraries(kcm_kwallet5
Qt6::Core
- KF6::AuthCore
KF6::CoreAddons
KF6::KCMUtils
KF6::Wallet
@@ -20,19 +19,22 @@ target_link_libraries(kcm_kwallet5
install(TARGETS kcm_kwallet5 DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/kcms/systemsettings_qwidgets)
-########### kauth helper ################
-add_executable(kcm_kwallet_helper5)
-target_sources(kcm_kwallet_helper5 PRIVATE savehelper.cpp savehelper.h)
-
-target_link_libraries(kcm_kwallet_helper5
- Qt6::Core
- KF6::AuthCore
- KF6::Wallet
- KF6::CoreAddons
-)
+# The helper is not improving security and was disabled.
+# See https://bugzilla.suse.com/show_bug.cgi?id=1217190
-install(TARGETS kcm_kwallet_helper5 DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
-
-kauth_install_helper_files(kcm_kwallet_helper5 org.kde.kcontrol.kcmkwallet5 root)
-kauth_install_actions(org.kde.kcontrol.kcmkwallet5 kwallet.actions)
+########### kauth helper ################
+# add_executable(kcm_kwallet_helper5)
+# target_sources(kcm_kwallet_helper5 PRIVATE savehelper.cpp savehelper.h)
+#
+# target_link_libraries(kcm_kwallet_helper5
+# Qt6::Core
+# KF6::AuthCore
+# KF6::Wallet
+# KF6::CoreAddons
+# )
+
+# install(TARGETS kcm_kwallet_helper5 DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
+
+# kauth_install_helper_files(kcm_kwallet_helper5 org.kde.kcontrol.kcmkwallet5 root)
+# kauth_install_actions(org.kde.kcontrol.kcmkwallet5 kwallet.actions)
diff --git a/src/konfigurator/konfigurator.cpp b/src/konfigurator/konfigurator.cpp
index cc5e4a5..dfe70bc 100644
--- a/src/konfigurator/konfigurator.cpp
+++ b/src/konfigurator/konfigurator.cpp
@@ -7,15 +7,11 @@
#include "../kwalletmanager_version.h"
#include "konfigurator.h"
-#include <KAuth/Action>
-#include <KAuth/ActionReply>
-#include <KAuth/ExecuteJob>
#include <KConfigGroup>
#include <KMessageBox>
#include <KPluginFactory>
#include <KWallet>
#include <QInputDialog>
-#include <kauth_version.h>
#include <KAboutData>
@@ -39,7 +35,6 @@ KWalletConfig::KWalletConfig(QObject *parent, const KPluginMetaData &data)
, _wcw(new WalletConfigWidget(widget()))
, _cfg(KSharedConfig::openConfig(QStringLiteral("kwalletrc"), KConfig::NoGlobals))
{
- setAuthActionName(QStringLiteral("org.kde.kcontrol.kcmkwallet5.save"));
auto vbox = new QVBoxLayout(widget());
vbox->setContentsMargins(0, 0, 0, 0);
vbox->addWidget(_wcw);
@@ -238,30 +233,6 @@ void KWalletConfig::load()
void KWalletConfig::save()
{
- QVariantMap args;
- KAuth::Action action(QLatin1String("org.kde.kcontrol.kcmkwallet5.save"));
- action.setHelperId(QStringLiteral("org.kde.kcontrol.kcmkwallet5"));
-
- widget()->window()->winId();
- action.setParentWindow(widget()->window()->windowHandle());
- if (!action.isValid()) {
- qDebug() << "There's no authAction, not saving settings";
- return;
- }
- action.setArguments(args);
-
- KAuth::ExecuteJob *j = action.execute();
-
- if (!j->exec()) {
- if (j->error() == KAuth::ActionReply::AuthorizationDeniedError) {
- KMessageBox::error(widget(), i18n("Permission denied."), i18n("KDE Wallet Control Module"));
- } else {
- KMessageBox::error(widget(), i18n("Error while authenticating action:\n%1", j->errorString()), i18n("KDE Wallet Control Module"));
- }
- load();
- return;
- }
-
KConfigGroup config(_cfg, QStringLiteral("Wallet"));
config.writeEntry("Enabled", _wcw->_enabled->isChecked());
config.writeEntry("Launch Manager", _wcw->_launchManager->isChecked());
diff --git a/src/konfigurator/konfigurator.h b/src/konfigurator/konfigurator.h
index 8075727..5ed884f 100644
--- a/src/konfigurator/konfigurator.h
+++ b/src/konfigurator/konfigurator.h
@@ -9,7 +9,6 @@
#include <KCModule>
#include <KSharedConfig>
#include "ui_walletconfigwidget.h"
-#include <KAuth/Action>
class WalletConfigWidget : public QWidget, public Ui::WalletConfigWidget
{
--
2.43.0

BIN
applications.keyring Normal file

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0e338cf413f105b6f2ef9c351a7c8cf93b91c19237ba832dfa56e1a59036487d
size 856516

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEyiYsbIPeTS+yijMqOmpNuDnqptcFAmW44e8ACgkQOmpNuDnq
ptec7w//aBU5WU9usyAYTHZbQEXUXHk7/gf7gJXSMTiiSDgOEETTr2VELMYPJmYI
Ug2bhavofug0VnpUThRdwi9HFrLgiuz4mcL6gXbstFy7EeoQ6ngUDpFTJCKh9hGK
9pyoGy8iGS3sRrtCInFw1xQD04n9oq8fN+NppDk5m3x7D/EmR+bVIjG1h+tKSFMG
bVe3aUOKmAZJPXcj3uUlDxFxs5sbYRb0/afKSLyWnkV3YalmsXMMzaasT7icPVx4
kR9n+3Ooa622UYyLBzCR9u/M7ZcbKd5TkvX+dTLkyGIp23/6Oake0u4md6s3QfnT
94+wmJg3UCgN/Bt+gvsD25Bs1fAcBKJdJVNNPN2VWG097lc5HCeUnI0EYQNUf8DH
CllqJpqyJmUYcdMlgLhP3aanBB8DbF/ob0G92P2R7PMNr23C9MDF4ac4c0Zs7zr9
dp7INmsp2vodBttMkgKdusJfKl6NiD2E4CVLfOHnlDBPTd57YPs17rpy6qWGf8Vz
pKdfujp/YGwvt5yv3zmplIDJ0X/MnToQ7+XwzO6pMc2ZwNnH3KD8QxVZSui4VSri
AT5vBYLJ4A0nVMN20V96o2F8h+jR36buRW+XeQz7HWf50qSijkXWbphQMRHQUzAV
xCIonOGdfkgtQDsACWaHuGBmp9aEZD5eJ2I125C3sScBkYxxodQ=
=Hs1X
-----END PGP SIGNATURE-----

12
kwalletmanager.changes Normal file
View File

@ -0,0 +1,12 @@
-------------------------------------------------------------------
Fri Feb 9 16:19:58 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 24.01.95
* https://kde.org/fr/announcements/megarelease/6/rc2/
- Add patch to avoid asking for password when saving settings (boo#1217190)
* 0001-Don-t-require-password-when-changing-settings.patch
-------------------------------------------------------------------
Sun Sep 10 08:11:06 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Init kwalletmanager

98
kwalletmanager.spec Normal file
View File

@ -0,0 +1,98 @@
#
# spec file for package kwalletmanager
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define kf6_version 5.246.0
%define qt6_version 6.6.0
%bcond_without released
Name: kwalletmanager
Version: 24.01.95
Release: 0
Summary: Wallet Management Tool
License: GPL-2.0-or-later
URL: https://apps.kde.org/kwalletmanager
Source: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz
%if %{with released}
Source1: https://download.kde.org/unstable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
Source2: applications.keyring
%endif
# PATCH-FIX-OPENSUSE -- boo#1217190 don't require password to save settings
Patch0: 0001-Don-t-require-password-when-changing-settings.patch
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: cmake(KF6Archive) >= %{kf6_version}
BuildRequires: cmake(KF6Config) >= %{kf6_version}
BuildRequires: cmake(KF6ConfigWidgets) >= %{kf6_version}
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires: cmake(KF6Crash) >= %{kf6_version}
BuildRequires: cmake(KF6DBusAddons) >= %{kf6_version}
BuildRequires: cmake(KF6DocTools) >= %{kf6_version}
BuildRequires: cmake(KF6I18n) >= %{kf6_version}
BuildRequires: cmake(KF6JobWidgets) >= %{kf6_version}
BuildRequires: cmake(KF6KCMUtils) >= %{kf6_version}
BuildRequires: cmake(KF6KIO) >= %{kf6_version}
BuildRequires: cmake(KF6Notifications) >= %{kf6_version}
BuildRequires: cmake(KF6Service) >= %{kf6_version}
BuildRequires: cmake(KF6StatusNotifierItem) >= %{kf6_version}
BuildRequires: cmake(KF6TextWidgets) >= %{kf6_version}
BuildRequires: cmake(KF6Wallet) >= %{kf6_version}
BuildRequires: cmake(KF6WindowSystem) >= %{kf6_version}
BuildRequires: cmake(KF6XmlGui) >= %{kf6_version}
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
BuildRequires: cmake(Qt6DBus) >= %{qt6_version}
BuildRequires: cmake(Qt6Gui) >= %{qt6_version}
BuildRequires: cmake(Qt6Widgets) >= %{qt6_version}
Provides: kwalletmanager5 = %{version}
Obsoletes: kwalletmanager5 < %{version}
Obsoletes: kwalletmanager5-lang < %{version}
%description
This application allows you to manage your KDE password wallet.
%lang_package
%prep
%autosetup -p1
%build
%cmake_kf6
%kf6_build
%install
%kf6_install
%find_lang %{name} --with-html --all-name
%ldconfig_scriptlets
%files
%license LICENSES/*
%doc %lang(en) %{_kf6_htmldir}/en/*/
%{_kf6_applicationsdir}/kwalletmanager5-kwalletd.desktop
%{_kf6_applicationsdir}/org.kde.kwalletmanager5.desktop
%{_kf6_appstreamdir}/org.kde.kwalletmanager5.appdata.xml
%{_kf6_bindir}/kwalletmanager5
%{_kf6_debugdir}/kwalletmanager.categories
%{_kf6_iconsdir}/hicolor/*/*/*.*
%{_kf6_plugindir}/plasma/kcms/systemsettings_qwidgets/kcm_kwallet5.so
%{_kf6_sharedir}/dbus-1/services/org.kde.kwalletmanager5.service
%files lang -f %{name}.lang
%exclude %{_kf6_htmldir}/en/*/
%changelog