From 5f3c2eb67ecb7e8dec262fc46ef173fe47a6e50c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:17:03 +0000 Subject: import konsole-4.10.5-4.el7 --- diff --git a/SOURCES/konsole-avoid-repeated-calls-to-redusername-method.patch b/SOURCES/konsole-avoid-repeated-calls-to-redusername-method.patch new file mode 100644 index 0000000..02e18c0 --- /dev/null +++ b/SOURCES/konsole-avoid-repeated-calls-to-redusername-method.patch @@ -0,0 +1,30 @@ +From 67aa1f8fb71df941bd62ebc046a182d2cba1f9d7 Mon Sep 17 00:00:00 2001 +From: Siteshwar Vashisht +Date: Fri, 18 Dec 2015 20:42:12 +0530 +Subject: [PATCH] Avoid repeated calls to readUserName() method + +readUserName() method calls getpwuid_r() function. If user information +is retrieved from remote server, it would flood the remote server +with repeated requests. Username should be retrieved only once for a +ProcessInfo instance. +--- + src/ProcessInfo.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/ProcessInfo.cpp b/src/ProcessInfo.cpp +index aba138e..78e9f67 100644 +--- a/src/ProcessInfo.cpp ++++ b/src/ProcessInfo.cpp +@@ -464,7 +464,9 @@ private: + const int uid = uidString.toInt(&ok); + if (ok) + setUserId(uid); +- readUserName(); ++ ++ if (userName().isEmpty()) ++ readUserName(); + } else { + setFileError(statusInfo.error()); + return false; +-- +2.1.0 diff --git a/SPECS/konsole.spec b/SPECS/konsole.spec index b03ac1d..74fc80b 100644 --- a/SPECS/konsole.spec +++ b/SPECS/konsole.spec @@ -1,7 +1,7 @@ Name: konsole Summary: KDE Terminal emulator Version: 4.10.5 -Release: 3%{?dist} +Release: 4%{?dist} # sources: MIT and LGPLv2 and LGPLv2+ and GPLv2+ License: GPLv2 and GFDL @@ -14,6 +14,8 @@ URL: http://konsole.kde.org/ %endif Source0: ftp://ftp.kde.org/pub/kde/%{stable}/%{version}/src/%{name}-%{version}.tar.xz +Patch1: konsole-avoid-repeated-calls-to-redusername-method.patch + BuildRequires: desktop-file-utils BuildRequires: kdelibs4-devel >= %{version} BuildRequires: kde-baseapps-devel >= %{version} @@ -39,6 +41,7 @@ Requires: kdelibs4%{?_isa}%{?_kde4_version: >= %{_kde4_version}} %prep %setup -q +%patch1 -p1 -b .avoid-repeated-calls-to-redusername-method %build mkdir -p %{_target_platform} @@ -80,6 +83,10 @@ desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/konsole.des %changelog +* Thu Mar 24 2016 Jan Grulich - 4.10.5-4 +- Avoid repeated calls to readUserName() method + Resolves: bz#1283800 + * Fri Jan 24 2014 Daniel Mach - 4.10.5-3 - Mass rebuild 2014-01-24