From 0600938b42c7f8535bf63fb2554a805d0e0172de Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 13 Oct 2011 15:06:21 +0200 Subject: [PATCH] after CVE-2011-2494 fix, iotop needs root privileges --- iotop-0.4.3-rootpriv.patch | 14 ++++++++++++++ iotop.spec | 10 +++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 iotop-0.4.3-rootpriv.patch diff --git a/iotop-0.4.3-rootpriv.patch b/iotop-0.4.3-rootpriv.patch new file mode 100644 index 0000000..1fa1567 --- /dev/null +++ b/iotop-0.4.3-rootpriv.patch @@ -0,0 +1,14 @@ +diff -up iotop-0.4.3/iotop/ui.py.rootpriv iotop-0.4.3/iotop/ui.py +--- iotop-0.4.3/iotop/ui.py.rootpriv 2011-10-11 16:59:48.204722984 +0200 ++++ iotop-0.4.3/iotop/ui.py 2011-10-11 16:59:55.833780660 +0200 +@@ -511,6 +511,10 @@ def main(): + locale.setlocale(locale.LC_ALL, '') + except locale.Error: + print 'unable to set locale, falling back to the default locale' ++ if os.getuid() != 1: ++ print 'root privileges required' ++ exit(1) ++ + parser = optparse.OptionParser(usage=USAGE, version='iotop ' + VERSION) + parser.add_option('-o', '--only', action='store_true', + dest='only', default=False, diff --git a/iotop.spec b/iotop.spec index ccbda86..d6038cb 100644 --- a/iotop.spec +++ b/iotop.spec @@ -1,13 +1,17 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: iotop Version: 0.4.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Top like utility for I/O Group: Applications/System License: GPLv2 URL: http://guichaz.free.fr/iotop/ Source0: http://guichaz.free.fr/iotop/files/%{name}-%{version}.tar.bz2 + +# after CVE-2011-2494 fix, iotop needs root privileges +Patch1: iotop-0.4.3-rootpriv.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -16,6 +20,7 @@ Requires: python %prep %setup +%patch1 -p1 -b .rootpriv %build %{__python} setup.py build @@ -44,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/* %changelog +* Thu Oct 13 2011 Michal Hlavinka 0.4.3-2 +- after CVE-2011-2494 fix, iotop needs root privileges + * Sun Sep 18 2011 Adel Gadllah 0.4.3-1 - New upstream version