From ecab052fcb7c9b3359a5a51e9731cbdf80c0985c0f5e37d8e3a8c3574d1a16a6 Mon Sep 17 00:00:00 2001 From: Johannes Weberhofer Date: Fri, 23 Jan 2015 10:27:14 +0000 Subject: [PATCH 1/2] Accepting request 282526 from home:weberho:branches:security Fixed strptime thread safety issue; bnc#914075 gh#fail2ban/fail2ban#906 OBS-URL: https://build.opensuse.org/request/show/282526 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=54 --- fail2ban-issue_906-strptime.patch | 12 ++++++++++++ fail2ban.changes | 5 +++++ fail2ban.spec | 8 ++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 fail2ban-issue_906-strptime.patch diff --git a/fail2ban-issue_906-strptime.patch b/fail2ban-issue_906-strptime.patch new file mode 100644 index 0000000..baee8b4 --- /dev/null +++ b/fail2ban-issue_906-strptime.patch @@ -0,0 +1,12 @@ +diff -ur fail2ban-0.8.14.orig/common/__init__.py fail2ban-0.8.14/common/__init__.py +--- fail2ban-0.8.14.orig/common/__init__.py 2014-08-19 22:23:33.000000000 +0200 ++++ fail2ban-0.8.14/common/__init__.py 2015-01-21 21:51:13.425141175 +0100 +@@ -28,3 +28,7 @@ + + # Custom debug level + logging.HEAVYDEBUG = 5 ++ ++from time import strptime ++# strptime thread safety hack-around - http://bugs.python.org/issue7980 ++strptime("2012", "%Y") + diff --git a/fail2ban.changes b/fail2ban.changes index 357afd6..faa0cb7 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 21 21:00:48 UTC 2015 - jweberhofer@weberhofer.at + +- Fixed strptime thread safety issue; bnc#914075 gh#fail2ban/fail2ban#906 + ------------------------------------------------------------------- Tue Nov 25 11:36:13 UTC 2014 - jweberhofer@weberhofer.at diff --git a/fail2ban.spec b/fail2ban.spec index ad71eae..b74f923 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -1,7 +1,7 @@ # # spec file for package fail2ban # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,8 +36,10 @@ Source4: %{name}.service Source5: %{name}.tmpfiles Source6: sfw-fail2ban.conf Source7: f2b-restart.conf -# PATCH-FIX-OPENSUSE fail2ban-opensuse-locations.patch bnc#878028 jweberhofer@weberhoferat -- update default locations for logfiles +# PATCH-FIX-OPENSUSE fail2ban-opensuse-locations.patch bnc#878028 jweberhofer@weberhofer.at -- update default locations for logfiles Patch100: fail2ban-opensuse-locations.patch +# PATCH-FIX-UPSTREAM fail2ban-issue_906-strptime.patch bnc#914075, gh#fail2ban/fail2ban#906 jweberhofer@weberhofer.at -- Fix strptime thread safety issue +Patch101: fail2ban-issue_906-strptime.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %if 0%{?suse_version} >= 1230 @@ -97,6 +99,8 @@ Just have to run the following command: %prep %setup %patch100 -p1 +%patch101 -p1 + # correct doc-path sed -i -e 's|%{_prefix}/share/doc/fail2ban|%{_docdir}/%{name}|' setup.py From 136706961e3a1cc48b1f5ce0249ddbae98f4c887c581d5fbaa55fbca80e06564 Mon Sep 17 00:00:00 2001 From: Johannes Weberhofer Date: Tue, 3 Feb 2015 12:15:48 +0000 Subject: [PATCH 2/2] Accepting request 283866 from home:weberho:branches:security Noted patch-name in changelog OBS-URL: https://build.opensuse.org/request/show/283866 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=55 --- fail2ban.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fail2ban.changes b/fail2ban.changes index faa0cb7..beb9c92 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- Wed Jan 21 21:00:48 UTC 2015 - jweberhofer@weberhofer.at -- Fixed strptime thread safety issue; bnc#914075 gh#fail2ban/fail2ban#906 +- Fixed strptime thread safety issue. + fail2ban-issue_906-strptime.patch (bnc#914075 gh#fail2ban/fail2ban#906) ------------------------------------------------------------------- Tue Nov 25 11:36:13 UTC 2014 - jweberhofer@weberhofer.at