rpms/net-snmp/devel net-snmp-5.1.2-ASN-unsigned64.patch, NONE, 1.1 net-snmp-5.2.1-typeclash.diff, NONE, 1.1 net-snmp.spec, 1.34, 1.35

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Mar 24 12:41:09 UTC 2005


Update of /cvs/dist/rpms/net-snmp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv27341

Modified Files:
	net-snmp.spec 
Added Files:
	net-snmp-5.1.2-ASN-unsigned64.patch 
	net-snmp-5.2.1-typeclash.diff 
Log Message:

 - fixed unexpected length for type ASN_UNSIGNED (#151892)
 - fixed uptime problems on ia64



net-snmp-5.1.2-ASN-unsigned64.patch:
 snmp_api.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletion(-)

--- NEW FILE net-snmp-5.1.2-ASN-unsigned64.patch ---
--- net-snmp-5.1.2/snmplib/snmp_api.c.ASN-unsigned64	2004-06-21 12:02:15.000000000 +0200
+++ net-snmp-5.1.2/snmplib/snmp_api.c	2005-02-15 18:13:50.694158600 +0100
@@ -6267,6 +6267,23 @@
     vars->val_len = len;
     switch (type) {
     case ASN_INTEGER:
+        if (value) {
+            if (largeval) {
+                snmp_log(LOG_ERR,"bad size for integer-like type (%d)\n",
+                         vars->val_len);
+                snmp_free_var(vars);
+                return (0);
+            } else if (vars->val_len == sizeof(int)) {
+                val_int = (const int *) value;
+                *(vars->val.integer) = (long) *val_int;
+            } else {
+                val_long = (const long *) value;
+                *(vars->val.integer) = *val_long;
+            }
+        }
+        vars->val_len = sizeof(long);
+        break;
+
     case ASN_UNSIGNED:
     case ASN_TIMETICKS:
     case ASN_IPADDRESS:
@@ -6279,7 +6296,7 @@
                 return (0);
             } else if (vars->val_len == sizeof(int)) {
                 val_int = (const int *) value;
-                *(vars->val.integer) = (long) *val_int;
+                *(vars->val.integer) = (long) *(const unsigned int *)val_int;
             } else {
                 val_long = (const long *) value;
                 *(vars->val.integer) = *val_long;

net-snmp-5.2.1-typeclash.diff:
 scapi.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

--- NEW FILE net-snmp-5.2.1-typeclash.diff ---
--- snmplib/scapi.c
+++ snmplib/scapi.c
@@ -334,6 +334,7 @@
     int             rval = SNMPERR_SUCCESS;
     const EVP_MD         *hashfn;
     EVP_MD_CTX     ctx, *cptr;
+    unsigned int   tmp_len;
 #endif
 
     DEBUGTRACE;
@@ -379,13 +380,16 @@
 
 /** do the final pass */
 #if defined(OLD_DES)
-    EVP_DigestFinal(cptr, MAC, MAC_len);
+    EVP_DigestFinal(cptr, MAC, &tmp_len);
+    *MAC_len = tmp_len;
 #else /* !OLD_DES */
     if (SSLeay() < 0x907000) {
-        EVP_DigestFinal(cptr, MAC, MAC_len);
+        EVP_DigestFinal(cptr, MAC, &tmp_len);
+        *MAC_len = tmp_len;
         free(cptr);
     } else {
-        EVP_DigestFinal_ex(cptr, MAC, MAC_len);
+        EVP_DigestFinal_ex(cptr, MAC, &tmp_len);
+        *MAC_len = tmp_len;
         EVP_MD_CTX_cleanup(cptr);
     }
 #endif


Index: net-snmp.spec
===================================================================
RCS file: /cvs/dist/rpms/net-snmp/devel/net-snmp.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- net-snmp.spec	10 Mar 2005 10:56:55 -0000	1.34
+++ net-snmp.spec	24 Mar 2005 12:41:07 -0000	1.35
@@ -3,7 +3,7 @@
 Summary: A collection of SNMP protocol tools and libraries.
 Name: net-snmp
 Version: 5.2.1
-Release: 5
+Release: 6
 License: BSDish
 Group: System Environment/Daemons
 URL: http://net-snmp.sourceforge.net/
@@ -31,12 +31,14 @@
 #Patch13: net-snmp-5.2-ipsystemstats.patch
 Patch14: net-snmp-5.1.2-conf_list.patch
 Patch15: net-snmp-5.2.1-trim.patch
+Patch16: net-snmp-5.1.2-ASN-unsigned64.patch
+Patch17: net-snmp-5.2.1-typeclash.diff
 
 Prereq: /sbin/chkconfig
 Obsoletes: ucd-snmp
 BuildRoot: %{_tmppath}/%{name}-root
 BuildPrereq: openssl-devel, bzip2-devel, beecrypt-devel, elfutils-devel, libselinux-devel
-%ifarch %{ix86}
+%ifarch %{ix86} x86_64
 BuildPrereq: lm_sensors-devel
 %endif
 %if %{tcp_wrappers}
@@ -141,6 +143,8 @@
 
 # from CVS
 %patch15 -p1 -b .trim
+%patch16 -p1 -b .ASN-unsigned64
+%patch17 -b .typeclash
 
 # Do this patch with a perl hack...
 perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh
@@ -318,6 +322,10 @@
 %{_libdir}/*.la
 
 %changelog
+* Thu Mar 24 2005 Radek Vokal <rvokal at redhat.com> - 5.2.1-6
+- fixed unexpected length for type ASN_UNSIGNED (#151892)
+- fixed uptime problems on ia64
+
 * Wed Mar 09 2005 Radek Vokal <rvokal at redhat.com> - 5.2.1-5
 - 64bit needed some changes, was causing timeouts on 64bit archs!? 
 - affects bugs #125432 and #132058




More information about the fedora-cvs-commits mailing list