after CVE-2011-2494 fix, iotop needs root privileges
This commit is contained in:
parent
380040b41f
commit
0600938b42
14
iotop-0.4.3-rootpriv.patch
Normal file
14
iotop-0.4.3-rootpriv.patch
Normal file
@ -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,
|
10
iotop.spec
10
iotop.spec
@ -1,13 +1,17 @@
|
|||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
Name: iotop
|
Name: iotop
|
||||||
Version: 0.4.3
|
Version: 0.4.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Top like utility for I/O
|
Summary: Top like utility for I/O
|
||||||
|
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://guichaz.free.fr/iotop/
|
URL: http://guichaz.free.fr/iotop/
|
||||||
Source0: http://guichaz.free.fr/iotop/files/%{name}-%{version}.tar.bz2
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -16,6 +20,7 @@ Requires: python
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
|
%patch1 -p1 -b .rootpriv
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
@ -44,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 13 2011 Michal Hlavinka <mhlavink@redhat.com> 0.4.3-2
|
||||||
|
- after CVE-2011-2494 fix, iotop needs root privileges
|
||||||
|
|
||||||
* Sun Sep 18 2011 Adel Gadllah <adel.gadllah@gmail.com> 0.4.3-1
|
* Sun Sep 18 2011 Adel Gadllah <adel.gadllah@gmail.com> 0.4.3-1
|
||||||
- New upstream version
|
- New upstream version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user