rpms/sysstat/F-12 sysstat-9.0.4-nfs.patch, NONE, 1.1 sysstat.spec, 1.73, 1.74
Ivana Varekova
varekova at fedoraproject.org
Thu Dec 10 14:58:01 UTC 2009
Author: varekova
Update of /cvs/pkgs/rpms/sysstat/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24643
Modified Files:
sysstat.spec
Added Files:
sysstat-9.0.4-nfs.patch
Log Message:
- fix the problem in get_nfs_mount_nr function
( iostat -n causes stack smashing)
sysstat-9.0.4-nfs.patch:
common.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- NEW FILE sysstat-9.0.4-nfs.patch ---
diff -up sysstat-9.0.4/common.c.orig sysstat-9.0.4/common.c
--- sysstat-9.0.4/common.c.orig 2009-12-10 09:48:07.158258512 -0500
+++ sysstat-9.0.4/common.c 2009-12-10 09:49:32.888299550 -0500
@@ -275,7 +275,7 @@ int get_nfs_mount_nr(void)
{
FILE *fp;
char line[8192];
- char type_name[10];
+ char *type_name;
unsigned int nfs = 0;
if ((fp = fopen(NFSMOUNTSTATS, "r")) == NULL)
@@ -285,12 +285,9 @@ int get_nfs_mount_nr(void)
while (fgets(line, 8192, fp) != NULL) {
if ((strstr(line, "mounted")) && (strstr(line, "on")) &&
- (strstr(line, "with")) && (strstr(line, "fstype"))) {
-
- sscanf(strstr(line, "fstype") + 6, "%10s", type_name);
- if ((!strncmp(type_name, "nfs", 3)) && (strncmp(type_name, "nfsd", 4))) {
- nfs ++;
- }
+ (strstr(line, "with fstype nfs")) &&
+ !(strstr(line, "with fstype nfsd"))) {
+ nfs++;
}
}
Index: sysstat.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sysstat/F-12/sysstat.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -p -r1.73 -r1.74
--- sysstat.spec 15 Sep 2009 14:49:20 -0000 1.73
+++ sysstat.spec 10 Dec 2009 14:58:01 -0000 1.74
@@ -1,12 +1,13 @@
Name: sysstat
Version: 9.0.4
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: The sar and iostat system monitoring commands
License: GPLv2+
Group: Applications/System
URL: http://perso.orange.fr/sebastien.godard/
Source: http://perso.orange.fr/sebastien.godard/%{name}-%{version}.tar.bz2
Patch0: sysstat-9.0.4-init_script.patch
+Patch1: sysstat-9.0.4-nfs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -23,6 +24,7 @@ activity.
%prep
%setup -q
%patch0 -p1 -b .ii
+%patch1 -p1 -b .nfs
iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
mv CREDITS.aux CREDITS
@@ -74,6 +76,10 @@ rm -rf %{buildroot}
%{_localstatedir}/log/sa
%changelog
+* Thu Dec 10 2009 Ivana Hutarova Varekova <varekova at redhat.com> - 9.0.4-5
+- fix the problem in get_nfs_mount_nr function
+ ( iostat -n causes stack smashing)
+
* Tue Sep 15 2009 Ivana Varekova <varekova at redhat.com> - 9.0.4-4
- fix init script
More information about the fedora-extras-commits
mailing list