rpms/net-snmp/devel net-snmp-5.4.2.1-proc-div0.patch, NONE, 1.1 net-snmp-5.2.1-file_offset.patch, 1.2, 1.3 net-snmp.spec, 1.179, 1.180
Jan Šafránek
jsafrane at fedoraproject.org
Mon May 18 10:21:22 UTC 2009
- Previous message (by thread): rpms/libgtop2/devel .cvsignore, 1.51, 1.52 libgtop2.spec, 1.77, 1.78 sources, 1.51, 1.52
- Next message (by thread): rpms/gok/devel .cvsignore, 1.37, 1.38 gok.spec, 1.74, 1.75 sources, 1.37, 1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jsafrane
Update of /cvs/pkgs/rpms/net-snmp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29235
Modified Files:
net-snmp-5.2.1-file_offset.patch net-snmp.spec
Added Files:
net-snmp-5.4.2.1-proc-div0.patch
Log Message:
fix divison-by-zero in cpu statistics
Resolves: #501210
net-snmp-5.4.2.1-proc-div0.patch:
--- NEW FILE net-snmp-5.4.2.1-proc-div0.patch ---
501210: net-snmp SIGFPE 0x00002aaaab37744a in var_hrproc (vp=0x7fffffffbf50)
Author: Jan Safranek <jsafrane at redhat.com>
Upstream as SVN rev. 17616.
Index: net-snmp/agent/mibgroup/host/hr_proc.c
===================================================================
--- net-snmp/agent/mibgroup/host/hr_proc.c (revision 17615)
+++ net-snmp/agent/mibgroup/host/hr_proc.c (working copy)
@@ -182,7 +182,10 @@
return NULL;
long_return = (cpu->idle_ticks - cpu->history[0].idle_hist)*100;
- long_return /= (cpu->total_ticks - cpu->history[0].total_hist);
+ if (cpu->total_ticks > cpu->history[0].total_hist) /* avoid div. by 0 */
+ long_return /= (cpu->total_ticks - cpu->history[0].total_hist);
+ else
+ long_return = 0;
long_return = 100 - long_return;
if (long_return < 0)
long_return = 0;
net-snmp-5.2.1-file_offset.patch:
Index: net-snmp-5.2.1-file_offset.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmp-5.2.1-file_offset.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- net-snmp-5.2.1-file_offset.patch 25 Jul 2008 11:03:32 -0000 1.2
+++ net-snmp-5.2.1-file_offset.patch 18 May 2009 10:21:21 -0000 1.3
@@ -1,7 +1,7 @@
-diff -up net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c.backup_patch_7 net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c
---- net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c.backup_patch_7 2007-05-18 20:08:01.000000000 +0200
-+++ net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.c 2008-07-25 12:53:28.000000000 +0200
-@@ -911,7 +911,7 @@ Get_FSIndex(char *dev)
+diff -up net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.c.file_offset net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.c
+--- net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.c.file_offset 2004-06-19 15:34:11.000000000 +0200
++++ net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.c 2009-01-22 14:42:26.000000000 +0100
+@@ -783,7 +783,7 @@ Get_FSIndex(char *dev)
return 0;
}
@@ -10,9 +10,9 @@ diff -up net-snmp-5.4.1/agent/mibgroup/h
Get_FSSize(char *dev)
{
struct HRFS_statfs statfs_buf;
-diff -up net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.h.backup_patch_7 net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.h
---- net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.h.backup_patch_7 2002-07-04 14:58:04.000000000 +0200
-+++ net-snmp-5.4.1/agent/mibgroup/host/hr_filesys.h 2008-07-25 12:53:28.000000000 +0200
+diff -up net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.h.file_offset net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.h
+--- net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.h.file_offset 2002-07-04 14:56:35.000000000 +0200
++++ net-snmp-5.1.2/agent/mibgroup/host/hr_filesys.h 2009-01-22 14:42:26.000000000 +0100
@@ -12,7 +12,7 @@ extern int Get_Next_HR_FileSys(void
extern int Check_HR_FileSys_NFS(void);
@@ -22,27 +22,3 @@ diff -up net-snmp-5.4.1/agent/mibgroup/h
#endif /* _MIBGROUP_HRFSYS_H */
-diff -up net-snmp-5.4.1/agent/snmp_vars.c.backup_patch_7 net-snmp-5.4.1/agent/snmp_vars.c
---- net-snmp-5.4.1/agent/snmp_vars.c.backup_patch_7 2006-09-15 02:48:50.000000000 +0200
-+++ net-snmp-5.4.1/agent/snmp_vars.c 2008-07-25 12:53:28.000000000 +0200
-@@ -224,7 +224,7 @@ extern netsnmp_subtree *subtrees;
- * int name_len IN - number of sub-ids in the name
- */
-
--long long_return;
-+fsblkcnt_t long_return;
- #ifndef ibm032
- u_char return_buf[258];
- #else
-diff -up net-snmp-5.4.1/include/net-snmp/agent/snmp_vars.h.backup_patch_7 net-snmp-5.4.1/include/net-snmp/agent/snmp_vars.h
---- net-snmp-5.4.1/include/net-snmp/agent/snmp_vars.h.backup_patch_7 2005-06-21 23:33:55.000000000 +0200
-+++ net-snmp-5.4.1/include/net-snmp/agent/snmp_vars.h 2008-07-25 12:53:28.000000000 +0200
-@@ -73,7 +73,7 @@ PERFORMANCE OF THIS SOFTWARE.
-
- struct nlist;
-
-- extern long long_return;
-+ extern fsblkcnt_t long_return;
- extern u_char return_buf[];
-
- extern oid nullOid[];
Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -p -r1.179 -r1.180
--- net-snmp.spec 6 Mar 2009 22:52:04 -0000 1.179
+++ net-snmp.spec 18 May 2009 10:21:21 -0000 1.180
@@ -8,7 +8,7 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: %{major_ver}
-Release: 10%{?dist}
+Release: 11%{?dist}
Epoch: 1
License: BSD and MIT
@@ -35,6 +35,7 @@ Patch10: net-snmp-5.4.1-shared-ip.patch
Patch11: net-snmp-5.4.1-sensors3.patch
Patch12: net-snmp-5.4.1-xen-crash.patch
Patch13: net-snmp-5.4.1-libwrap.patch
+Patch14: net-snmp-5.4.2.1-proc-div0.patch
Requires(pre): chkconfig
Requires(post): chkconfig
@@ -173,6 +174,7 @@ Net-SNMP toolkit library.
%patch11 -p1 -b .sensors
%patch12 -p1 -b .xen-crash
%patch13 -p1 -b .libwrap
+%patch14 -p1 -b .proc-div0
# Do this patch with a perl hack...
perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -421,6 +423,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_datadir}/snmp/mibs
%changelog
+* Mon May 18 2009 Jan Safranek <jsafranek at redhat.com> 5.4.2.1-11
+- fix divison-by-zero in cpu statistics (#501210)
+
* Fri Mar 06 2009 Jesse Keating <jkeating at redhat.com> - 5.4.2.1-10
- Rebuild for new rpm
- Previous message (by thread): rpms/libgtop2/devel .cvsignore, 1.51, 1.52 libgtop2.spec, 1.77, 1.78 sources, 1.51, 1.52
- Next message (by thread): rpms/gok/devel .cvsignore, 1.37, 1.38 gok.spec, 1.74, 1.75 sources, 1.37, 1.38
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list