[Pkg-cli-apps-commits] [SCM] keepass2 branch, master, updated. debian/2.15+dfsg-2-12-g00a56ed
Julian Taylor
jtaylor.debian at googlemail.com
Tue Jun 21 17:43:02 UTC 2011
The following commit has been merged in the master branch:
commit 315acb6a21dd72a8635ac15644e2b9e01bf84e3d
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date: Tue May 3 21:54:15 2011 +0200
patch: fix WebClient for ftp access under mono (LP: #783268)
diff --git a/debian/patches/14_fix-WebClient-for-ftp-access-under-mono.patch b/debian/patches/14_fix-WebClient-for-ftp-access-under-mono.patch
new file mode 100644
index 0000000..9172555
--- /dev/null
+++ b/debian/patches/14_fix-WebClient-for-ftp-access-under-mono.patch
@@ -0,0 +1,85 @@
+From: Julian Taylor <jtaylor.debian at googlemail.com>
+Date: Tue, 3 May 2011 20:00:11 +0200
+Subject: fix WebClient for ftp access under mono
+
+skip setting CachePolicy, not implemented and ignored in mono < 2.10
+always set Credentials, required by mono
+ -default username to "anonymous" when none set
+Applied-Upstream: 2.16
+---
+ KeePass/Util/CheckForUpdate.cs | 8 +++++++-
+ KeePassLib/Serialization/IOConnection.cs | 21 +++++++++++++++++++--
+ 2 files changed, 26 insertions(+), 3 deletions(-)
+
+diff --git a/KeePass/Util/CheckForUpdate.cs b/KeePass/Util/CheckForUpdate.cs
+index 9cf651e..b2a1e39 100644
+--- a/KeePass/Util/CheckForUpdate.cs
++++ b/KeePass/Util/CheckForUpdate.cs
+@@ -68,7 +68,13 @@ namespace KeePass.Util
+ try
+ {
+ WebClient webClient = new WebClient();
+- webClient.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++
++ // Not implemented and ignored in Mono < 2.10
++ try
++ {
++ webClient.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++ }
++ catch(NotImplementedException) { }
+
+ Uri uri = new Uri(m_strVersionURL);
+
+diff --git a/KeePassLib/Serialization/IOConnection.cs b/KeePassLib/Serialization/IOConnection.cs
+index 6bdbe3c..9170175 100644
+--- a/KeePassLib/Serialization/IOConnection.cs
++++ b/KeePassLib/Serialization/IOConnection.cs
+@@ -30,6 +30,7 @@ using System.Net.Cache;
+ using System.Net.Security;
+ #endif
+
++using KeePassLib.Native;
+ using KeePassLib.Utility;
+
+ namespace KeePassLib.Serialization
+@@ -92,10 +93,18 @@ namespace KeePassLib.Serialization
+ PrepareWebAccess();
+
+ IOWebClient wc = new IOWebClient();
+- wc.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++
++ // Not implemented and ignored in Mono < 2.10
++ try
++ {
++ wc.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++ }
++ catch(NotImplementedException) { }
+
+ if((ioc.UserName.Length > 0) || (ioc.Password.Length > 0))
+ wc.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
++ else if(NativeLib.IsUnix()) // Mono requires credentials
++ wc.Credentials = new NetworkCredential("anonymous", string.Empty);
+
+ return wc;
+ }
+@@ -106,10 +115,18 @@ namespace KeePassLib.Serialization
+
+ WebRequest req = WebRequest.Create(ioc.Path);
+ ConfigureWebRequest(req);
+- req.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++
++ // Not implemented and ignored in Mono < 2.10
++ try
++ {
++ req.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
++ }
++ catch(NotImplementedException) { }
+
+ if((ioc.UserName.Length > 0) || (ioc.Password.Length > 0))
+ req.Credentials = new NetworkCredential(ioc.UserName, ioc.Password);
++ else if(NativeLib.IsUnix()) // Mono requires credentials
++ req.Credentials = new NetworkCredential("anonymous", string.Empty);
+
+ return req;
+ }
+--
diff --git a/debian/patches/series b/debian/patches/series
index 9e76a8f..e6847e1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
11_disable-multiple-instance-support.patch
12_fix-single-instance-enforcement.patch
13-remove-ToolsVersion-3.5.patch
+14_fix-WebClient-for-ftp-access-under-mono.patch
--
keepass2
More information about the Pkg-cli-apps-commits
mailing list