rpms/net-snmp/F-11 net-snmp-5.4.2.1-hrswprocpath.patch, NONE, 1.1 net-snmp.spec, 1.181, 1.182

Jan Šafránek jsafrane at fedoraproject.org
Thu Nov 19 14:28:19 UTC 2009


Author: jsafrane

Update of /cvs/pkgs/rpms/net-snmp/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3092/F-11

Modified Files:
	net-snmp.spec 
Added Files:
	net-snmp-5.4.2.1-hrswprocpath.patch 
Log Message:
fix hrSWRunPath not being returned by snmpd
Resolves: #512345

net-snmp-5.4.2.1-hrswprocpath.patch:
 hr_swrun.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE net-snmp-5.4.2.1-hrswprocpath.patch ---
512345:  net-snmp not correctly returning hrSWRunPath

Source: upstream, SVN rev. 17460

    Proper check for empty process status file.
    (Avoids truncated walk of hrSWRunPath on SuSE systems)
    Reported by Kamil Kisiel.
    
    
    
    git-svn-id: https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk@17460 06827809-a52a-0410-b366-d66718629ded

diff --git a/net-snmp/agent/mibgroup/host/hr_swrun.c b/net-snmp/agent/mibgroup/host/hr_swrun.c
index b6ade26..71e5409 100644
--- a/net-snmp/agent/mibgroup/host/hr_swrun.c
+++ b/net-snmp/agent/mibgroup/host/hr_swrun.c
@@ -752,8 +752,7 @@ var_hrswrun(struct variable * vp,
             sprintf(string, "/proc/%d/status", pid);
             if ((fp = fopen(string, "r")) == NULL)
                 return NULL;
-            fgets(buf, sizeof(buf), fp);        /* Name: process name */
-            if ( cp == NULL ) {
+            if (!fgets(buf, sizeof(buf), fp)) {
                 fclose(fp);
                 return NULL;    /* the process probably died */
             }


Index: net-snmp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-snmp/F-11/net-snmp.spec,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -p -r1.181 -r1.182
--- net-snmp.spec	18 May 2009 11:18:12 -0000	1.181
+++ net-snmp.spec	19 Nov 2009 14:28:18 -0000	1.182
@@ -8,7 +8,7 @@
 Summary: A collection of SNMP protocol tools and libraries
 Name: net-snmp
 Version: %{major_ver}
-Release: 12%{?dist}
+Release: 13%{?dist}
 Epoch: 1
 
 License: BSD and MIT
@@ -36,6 +36,7 @@ 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
+Patch15: net-snmp-5.4.2.1-hrswprocpath.patch
 
 Requires(pre): chkconfig
 Requires(post): chkconfig
@@ -175,6 +176,7 @@ Net-SNMP toolkit library.
 %patch12 -p1 -b .xen-crash
 %patch13 -p1 -b .libwrap
 %patch14 -p1 -b .proc-div0
+%patch15 -p2 -b .hrswprocpath
 
 # Do this patch with a perl hack...
 perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -423,6 +425,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_datadir}/snmp/mibs
 
 %changelog
+* Thu Nov 19 2009 Jan Safranek <jsafrane at redhat.com> 5.4.2.1-13
+- fix hrSWRunPath not being returned by snmpd (#512345)
+
 * Mon May 18 2009 Jan Safranek <jsafranek at redhat.com> 5.4.2.1-12
 - fix divison-by-zero in cpu statistics (#501210)
 




More information about the fedora-extras-commits mailing list