From 2649d758c01a5e19238657475b7d3f99db35f9ba Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 10:52:37 +0000 Subject: import python-kdcproxy-0.3.2-2.el7 --- diff --git a/SOURCES/Downgrade-socket-problems-to-warnings.patch b/SOURCES/Downgrade-socket-problems-to-warnings.patch new file mode 100644 index 0000000..0f11585 --- /dev/null +++ b/SOURCES/Downgrade-socket-problems-to-warnings.patch @@ -0,0 +1,45 @@ +From ea304c819659a8f54d9545eff9af262898a3193a Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Tue, 3 Jul 2018 15:04:28 -0400 +Subject: [PATCH] Downgrade socket problems to warnings + +Previously, these were logged at exception - which logs at ERROR and +prints a traceback. This led to two problems: first, that they're not +kdcproxy errors (rather problems with the other end); and second, that +the traceback is quite noisy. Log a simplified version of the +exception instead of the traceback. + +In the process, correct the sendall() error message to refer to +sendall(), not recv(). + +(cherry picked from commit 074fda5394b5ae201da1ceb6d61ad55f8557db50) +--- + kdcproxy/__init__.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/kdcproxy/__init__.py b/kdcproxy/__init__.py +index 9fc1418..ab6ed8a 100644 +--- a/kdcproxy/__init__.py ++++ b/kdcproxy/__init__.py +@@ -99,8 +99,8 @@ class Application: + else: + sock.sendall(pr.request) + extra = 10 # New connections get 10 extra seconds +- except Exception: +- logging.exception('Error in recv() of %s', sock) ++ except Exception as e: ++ logging.warning("Conection broken while writing (%s)", e) + continue + rsocks.append(sock) + wsocks.remove(sock) +@@ -108,8 +108,8 @@ class Application: + for sock in r: + try: + reply = self.__handle_recv(sock, read_buffers) +- except Exception: +- logging.exception('Error in recv() of %s', sock) ++ except Exception as e: ++ logging.warning("Connection broken while reading (%s)", e) + if self.sock_type(sock) == socket.SOCK_STREAM: + # Remove broken TCP socket from readers + rsocks.remove(sock) diff --git a/SPECS/python-kdcproxy.spec b/SPECS/python-kdcproxy.spec index 358315d..1979c6b 100644 --- a/SPECS/python-kdcproxy.spec +++ b/SPECS/python-kdcproxy.spec @@ -2,7 +2,7 @@ Name: python-%{realname} Version: 0.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MS-KKDCP (kerberos proxy) WSGI module License: MIT @@ -12,6 +12,8 @@ Source0: https://github.com/npmccallum/%{realname}/archive/v%{version}.ta BuildArch: noarch BuildRequires: python2-devel +Patch0: Downgrade-socket-problems-to-warnings.patch + %if 0%{?rhel} == 0 BuildRequires: python-tox BuildRequires: pytest @@ -52,6 +54,7 @@ minimal configuration. %prep %setup -q -n %{realname}-%{version} +%patch0 -p1 -b .Downgrade-socket-problems-to-warnings %build %{__python} setup.py build @@ -84,6 +87,10 @@ tox --sitepackages -e py27,py34 %endif %changelog +* Mon Dec 17 2018 Robbie Harwood - 0.3.2-2 +- Downgrade socket problems to warnings +- Resolves: #1525925 + * Mon Aug 03 2015 Nathaniel McCallum - 0.3.2-1 - Update to 0.3.2 - Fixes CVE-2015-5159