rpms/sysstat/F-11 sysstat-8.0.4-nfs.patch, NONE, 1.1 sysstat.spec, 1.67, 1.68

Ivana Varekova varekova at fedoraproject.org
Fri Dec 11 10:57:11 UTC 2009


Author: varekova

Update of /cvs/pkgs/rpms/sysstat/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15112

Modified Files:
	sysstat.spec 
Added Files:
	sysstat-8.0.4-nfs.patch 
Log Message:
- fix the problem in get_nfs_mount_nr function
  ( iostat -n causes stack smashing)


sysstat-8.0.4-nfs.patch:
 common.c |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

--- NEW FILE sysstat-8.0.4-nfs.patch ---
diff -up sysstat-8.0.4/common.c.pom sysstat-8.0.4/common.c
--- sysstat-8.0.4/common.c.pom	2009-12-11 11:42:00.000000000 +0100
+++ sysstat-8.0.4/common.c	2009-12-11 11:44:28.000000000 +0100
@@ -413,7 +413,6 @@ int get_nfs_mount_nr(void)
 {
    FILE *fp;
    char line[8192];
-   char type_name[10];
    unsigned int nfs = 0;
 
    if ((fp = fopen(NFSMOUNTSTATS, "r")) == NULL)
@@ -422,13 +421,10 @@ 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 ++;
-	 }
+      if ((strstr(line, "mounted")) && (strstr(line, "on")) &&
+	 (strstr(line, "with fstype nfs")) &&
+	 !(strstr(line, "with fstype nfsd"))) {
+		nfs++;
       }
    }
 


Index: sysstat.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sysstat/F-11/sysstat.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -p -r1.67 -r1.68
--- sysstat.spec	26 Feb 2009 04:56:48 -0000	1.67
+++ sysstat.spec	11 Dec 2009 10:57:11 -0000	1.68
@@ -1,6 +1,6 @@
 Name: sysstat
 Version: 8.0.4
-Release: 7%{?dist}
+Release: 8%{?dist}
 Summary: The sar and iostat system monitoring commands
 License: GPLv2+
 Group: Applications/System
@@ -10,6 +10,7 @@ Patch0: sysstat-8.0.4-write.patch
 Patch1: sysstat-8.0.4-nfs_ext.patch
 Patch2: sysstat-8.0.4-cpu.patch
 Patch3: sysstat-8.0.4-procdisksts.patch
+Patch4: sysstat-8.0.4-nfs.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 
@@ -29,6 +30,7 @@ activity.
 %patch1 -p1 -b .nfse
 %patch2 -p1 -b .cpu
 %patch3 -p1 -b .diskst
+%patch4 -p1 -b .nfs
 iconv -f windows-1252 -t utf8 CREDITS > CREDITS.aux
 mv CREDITS.aux CREDITS
 
@@ -80,6 +82,10 @@ rm -rf %{buildroot}
 %{_localstatedir}/log/sa
 
 %changelog
+* Fri Dec 11 2009 Ivana Hutarova Varekova <varekova at redhat.com> - 8.0.4-8
+- fix the problem in get_nfs_mount_nr function
+  ( iostat -n causes stack smashing)
+
 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8.0.4-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list