SOURCES: net-snmp-snmpksm.patch (NEW) - fix snmpksm build, even wi...

qboosh qboosh at pld-linux.org
Sat Dec 2 13:44:58 CET 2006


Author: qboosh                       Date: Sat Dec  2 12:44:58 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix snmpksm build, even with gcc 4

---- Files affected:
SOURCES:
   net-snmp-snmpksm.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/net-snmp-snmpksm.patch
diff -u /dev/null SOURCES/net-snmp-snmpksm.patch:1.1
--- /dev/null	Sat Dec  2 13:44:58 2006
+++ SOURCES/net-snmp-snmpksm.patch	Sat Dec  2 13:44:53 2006
@@ -0,0 +1,70 @@
+--- net-snmp-5.4/snmplib/snmpksm.c.orig	2006-09-16 19:56:11.000000000 +0200
++++ net-snmp-5.4/snmplib/snmpksm.c	2006-12-02 13:29:52.905425500 +0100
+@@ -63,11 +63,13 @@
+ #ifdef NETSNMP_USE_KERBEROS_HEIMDAL
+ #define CHECKSUM_TYPE(x)	(x)->cksumtype
+ #define CHECKSUM_CONTENTS(x)	((char *)((x)->checksum.data))
++#define CHECKSUM_CONTENTS_L(x)	((x)->checksum.data)
+ #define CHECKSUM_LENGTH(x)	(x)->checksum.length
+ #define TICKET_CLIENT(x)	(x)->client
+ #else				/* NETSNMP_USE_KERBEROS_HEIMDAL */
+ #define CHECKSUM_TYPE(x)	(x)->checksum_type
+ #define CHECKSUM_CONTENTS(x)	(x)->contents
++#define CHECKSUM_CONTENTS_L(x)	(x)->contents
+ #define CHECKSUM_LENGTH(x)	(x)->length
+ #define TICKET_CLIENT(x)	(x)->enc_part2->client
+ #endif				/* NETSNMP_USE_KERBEROS_HEIMDAL */
+@@ -481,7 +483,7 @@
+     outdata.data = NULL;
+     ivector.length = 0;
+     ivector.data = NULL;
+-    CHECKSUM_CONTENTS(&pdu_checksum) = NULL;
++    CHECKSUM_CONTENTS_L(&pdu_checksum) = NULL;
+ 
+     if (!ksm_state) {
+         /*
+@@ -489,7 +491,7 @@
+          * suppress this (temporarily) while we build the credential info.
+          *   XXX - what about "udp:host" style addresses?
+          */
+-        colon = strrchr(params->session->peername, ':');
++        colon = strrchr(parms->session->peername, ':');
+         if (colon != NULL) {
+             *colon='\0';
+         }
+@@ -952,7 +954,7 @@
+ 	/* we did the bogus checksum--don't need to ask for the size again
+ 	 * or initialize cksumtype; just free the bits */
+ 	free(CHECKSUM_CONTENTS(&pdu_checksum));
+-	CHECKSUM_CONTENTS(&pdu_checksum) = NULL;
++	CHECKSUM_CONTENTS_L(&pdu_checksum) = NULL;
+     }
+     else {
+ 	retval = krb5_checksumsize(kcontext, cksumtype,
+@@ -1072,7 +1074,7 @@
+      */
+ 
+ #ifndef OLD_HEIMDAL /* since heimdal allocs the mem for us */
+-    CHECKSUM_CONTENTS(&pdu_checksum) = malloc(CHECKSUM_LENGTH(&pdu_checksum));
++    CHECKSUM_CONTENTS_L(&pdu_checksum) = malloc(CHECKSUM_LENGTH(&pdu_checksum));
+ 
+     if (!CHECKSUM_CONTENTS(&pdu_checksum)) {
+         DEBUGMSGTL(("ksm", "Unable to malloc %d bytes for checksum\n",
+@@ -1228,7 +1230,7 @@
+ 
+     DEBUGMSGTL(("ksm", "Processing has begun\n"));
+ 
+-    CHECKSUM_CONTENTS(&checksum) = NULL;
++    CHECKSUM_CONTENTS_L(&checksum) = NULL;
+     ap_req.data = NULL;
+     ivector.length = 0;
+     ivector.data = NULL;
+@@ -1347,7 +1349,7 @@
+         goto error;
+     }
+ 
+-    CHECKSUM_CONTENTS(&checksum) = malloc(cksumlength);
++    CHECKSUM_CONTENTS_L(&checksum) = malloc(cksumlength);
+     if (!CHECKSUM_CONTENTS(&checksum)) {
+         DEBUGMSGTL(("ksm", "Unable to malloc %d bytes for checksum.\n",
+                     cksumlength));
================================================================


More information about the pld-cvs-commit mailing list