[kde-runtime] support initial_passwordless_kwallet option (kde review#110328)

Rex Dieter rdieter at fedoraproject.org
Sat Jun 29 18:18:32 UTC 2013


commit 3c13d5e07f1edf4ed16211b87bee47f9244d15e6
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Sat Jun 29 13:18:22 2013 -0500

    support initial_passwordless_kwallet option (kde review#110328)

 ...-on-access-kwalletd-setting-apply-in-more.patch |   47 ++++++++++++
 ...ntime-initial_passwordless_kwallet_option.patch |   76 ++++++--------------
 kde-runtime.spec                                   |   15 +++-
 3 files changed, 80 insertions(+), 58 deletions(-)
---
diff --git a/0007-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch b/0007-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
new file mode 100644
index 0000000..b13c2e8
--- /dev/null
+++ b/0007-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
@@ -0,0 +1,47 @@
+From f03500133a34d2f7553143533cbbf9d0e9615a14 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein at kde.org>
+Date: Sat, 29 Jun 2013 19:50:57 +0200
+Subject: [PATCH 7/7] Make "Prompt on access" kwalletd setting apply in more
+ situations
+
+Only the correct bits this time; see the already-closed REVIEW 110330.
+---
+ kwalletd/kwalletd.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/kwalletd/kwalletd.cpp b/kwalletd/kwalletd.cpp
+index fa9fc11..b940fd1 100644
+--- a/kwalletd/kwalletd.cpp
++++ b/kwalletd/kwalletd.cpp
+@@ -544,7 +544,7 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
+ 			return -1;
+ 		}
+ 
+-		if (emptyPass && _openPrompt && !isAuthorizedApp(appid, wallet, w)) {
++		if (emptyPass && !isAuthorizedApp(appid, wallet, w)) {
+ 			delete b;
+ 			return -1;
+ 		}
+@@ -598,6 +598,10 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
+ 
+ 
+ bool KWalletD::isAuthorizedApp(const QString& appid, const QString& wallet, WId w) {
++	if (!_openPrompt) {
++		return true;
++	}
++
+ 	int response = 0;
+ 
+ 	QString thisApp;
+@@ -1317,7 +1321,7 @@ void KWalletD::reconfigure() {
+ 	_leaveOpen = walletGroup.readEntry("Leave Open", false);
+ 	bool idleSave = _closeIdle;
+ 	_closeIdle = walletGroup.readEntry("Close When Idle", false);
+-	_openPrompt = walletGroup.readEntry("Prompt on Open", true);
++	_openPrompt = walletGroup.readEntry("Prompt on Open", false);
+ 	int timeSave = _idleTime;
+ 	// in minutes!
+ 	_idleTime = walletGroup.readEntry("Idle Timeout", 10) * 60 * 1000;
+-- 
+1.8.3.1
+
diff --git a/0005-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch b/kde-runtime-initial_passwordless_kwallet_option.patch
similarity index 78%
rename from 0005-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
rename to kde-runtime-initial_passwordless_kwallet_option.patch
index a9cbf76..5b5939b 100644
--- a/0005-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
+++ b/kde-runtime-initial_passwordless_kwallet_option.patch
@@ -1,17 +1,25 @@
-From 57ecab3217fa2941f0ef8741887e7b20b64563ac Mon Sep 17 00:00:00 2001
-From: Eike Hein <hein at kde.org>
-Date: Sat, 29 Jun 2013 17:25:46 +0200
-Subject: [PATCH 5/5] Make "Prompt on access" kwalletd setting apply in more
- situations
+diff --git a/kwalletd/kwalletd.h b/kwalletd/kwalletd.h
+index e8e74c3..8382306 100644
+--- a/kwalletd/kwalletd.h
++++ b/kwalletd/kwalletd.h
+@@ -223,6 +223,7 @@ class KWalletD : public QObject, protected QDBusContext {
+ 		// configuration values
+ 		bool _leaveOpen, _closeIdle, _launchManager, _enabled;
+ 		bool _openPrompt, _firstUse, _showingFailureNotify;
++		bool _silentlyCreateInitialWallet;
+ 		int _idleTime;
+ 		QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
+ 		KTimeout _closeTimers;
+commit da706667bb65f8e0a93372f2ba97fbab28fe4945
+Author: Eike Hein <hein at kde.org>
+Date:   Mon May 6 12:49:59 2013 +0200
 
-REVIEW:110330
----
- kwalletd/kwalletd.cpp | 72 ++++++++++++++++++++++++++++++---------------------
- kwalletd/kwalletd.h   |  1 +
- 2 files changed, 43 insertions(+), 30 deletions(-)
+    Add a config option to silently create the initial wallet.
+    
+    The wallet will have a zero-length password.
 
 diff --git a/kwalletd/kwalletd.cpp b/kwalletd/kwalletd.cpp
-index fa9fc11..1b8b5a4 100644
+index fa9fc11..660c404 100644
 --- a/kwalletd/kwalletd.cpp
 +++ b/kwalletd/kwalletd.cpp
 @@ -501,40 +501,47 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
@@ -30,7 +38,7 @@ index fa9fc11..1b8b5a4 100644
 -				}
 +			if (!_wallets.count() && _silentlyCreateInitialWallet) {
 +				brandNew = true;
-+				password = "";
++				password = QLatin1String();
 +				b->open(QByteArray());
  			} else {
 -				if (appid.length() == 0) {
@@ -90,27 +98,7 @@ index fa9fc11..1b8b5a4 100644
  		}
  
  
-@@ -544,7 +551,7 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
- 			return -1;
- 		}
- 
--		if (emptyPass && _openPrompt && !isAuthorizedApp(appid, wallet, w)) {
-+		if (emptyPass && !isAuthorizedApp(appid, wallet, w)) {
- 			delete b;
- 			return -1;
- 		}
-@@ -598,6 +605,10 @@ int KWalletD::internalOpen(const QString& appid, const QString& wallet, bool isP
- 
- 
- bool KWalletD::isAuthorizedApp(const QString& appid, const QString& wallet, WId w) {
-+	if (!_openPrompt) {
-+		return true;
-+	}
-+
- 	int response = 0;
- 
- 	QString thisApp;
-@@ -1312,12 +1323,13 @@ void KWalletD::reconfigure() {
+@@ -1312,6 +1319,7 @@ void KWalletD::reconfigure() {
  	KConfig cfg("kwalletrc");
  	KConfigGroup walletGroup(&cfg, "Wallet");
  	_firstUse = walletGroup.readEntry("First Use", true);
@@ -118,25 +106,3 @@ index fa9fc11..1b8b5a4 100644
  	_enabled = walletGroup.readEntry("Enabled", true);
  	_launchManager = walletGroup.readEntry("Launch Manager", true);
  	_leaveOpen = walletGroup.readEntry("Leave Open", false);
- 	bool idleSave = _closeIdle;
- 	_closeIdle = walletGroup.readEntry("Close When Idle", false);
--	_openPrompt = walletGroup.readEntry("Prompt on Open", true);
-+	_openPrompt = walletGroup.readEntry("Prompt on Open", false);
- 	int timeSave = _idleTime;
- 	// in minutes!
- 	_idleTime = walletGroup.readEntry("Idle Timeout", 10) * 60 * 1000;
-diff --git a/kwalletd/kwalletd.h b/kwalletd/kwalletd.h
-index e8e74c3..8382306 100644
---- a/kwalletd/kwalletd.h
-+++ b/kwalletd/kwalletd.h
-@@ -223,6 +223,7 @@ class KWalletD : public QObject, protected QDBusContext {
- 		// configuration values
- 		bool _leaveOpen, _closeIdle, _launchManager, _enabled;
- 		bool _openPrompt, _firstUse, _showingFailureNotify;
-+		bool _silentlyCreateInitialWallet;
- 		int _idleTime;
- 		QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap;
- 		KTimeout _closeTimers;
--- 
-1.8.3.1
-
diff --git a/kde-runtime.spec b/kde-runtime.spec
index c2ae3f2..e6229b3 100644
--- a/kde-runtime.spec
+++ b/kde-runtime.spec
@@ -6,7 +6,7 @@
 Name:    kde-runtime
 Summary: KDE Runtime
 Version: 4.10.90
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 # http://techbase.kde.org/Policies/Licensing_Policy
 License: LGPLv2+ and GPLv2+
@@ -54,8 +54,13 @@ Patch51: kde-runtime-4.9.0-installdbgsymbols.patch
 # https://bugs.kde.org/show_bug.cgi?id=316546
 Patch52: kde-runtime-mouseeventlistener.patch
 
+# support password-less kwallet by default (default off)
+# rejected upstream, I respectfully disagree -- rex
+# https://git.reviewboard.kde.org/r/110328/
+Patch53: kde-runtime-initial_passwordless_kwallet_option.patch
+
 ## upstream patches
-Patch0005: 0005-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
+Patch1007: 0007-Make-Prompt-on-access-kwalletd-setting-apply-in-more.patch
 
 # rhel patches
 Patch300: kde-runtime-4.9.2-webkit.patch
@@ -192,13 +197,14 @@ Requires: %{name} = %{version}-%{release}
 %patch11 -p1 -b .trash-readonly
 %patch51 -p1 -b .installdgbsymbols
 %patch52 -p1 -b .mouseeventlistener
+%patch53 -p1 -b .initial_passwordless_kwallet_option
 
 %if ! 0%{?webkit}
 %patch300 -p1 -b .webkit
 %global no_webkit -DKDERUNTIME_NO_WEBKIT:BOOL=ON -DPLASMA_NO_KDEWEBKIT:BOOL=ON
 %endif
 
-%patch0005 -p1 -b .0005
+%patch1007 -p1 -b .0007
 
 
 %build
@@ -411,6 +417,9 @@ fi
 
 
 %changelog
+* Sat Jun 29 2013 Rex Dieter <rdieter at fedoraproject.org> 4.10.90-3
+- support initial_passwordless_kwallet option (kde review#110328)
+
 * Sat Jun 29 2013 Rex Dieter <rdieter at fedoraproject.org> 4.10.90-2
 - pull in upstream kwallet-related work
 


More information about the scm-commits mailing list