[iotop/f16] after CVE-2011-2494 fix, iotop needs root privileges
Michal Hlavinka
mhlavink at fedoraproject.org
Thu Oct 13 13:48:27 UTC 2011
commit c0d57f9c52ed88ae353a9a638851f8612ba6ce0c
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Thu Oct 13 15:48:22 2011 +0200
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 deletions(-)
---
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..1cd3368 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 <mhlavink at redhat.com> - 0.4.3-2
+- after CVE-2011-2494 fix, iotop needs root privileges
+
* Sun Sep 18 2011 Adel Gadllah <adel.gadllah at gmail.com> 0.4.3-1
- New upstream version
More information about the scm-commits
mailing list