]> git.pld-linux.org Git - packages/net-snmp.git/blob - net-snmp-snmpksm.patch
Merge branch 'master' of git://git.pld-linux.org/packages/net-snmp
[packages/net-snmp.git] / net-snmp-snmpksm.patch
1 --- net-snmp-5.4/snmplib/snmpksm.c.orig 2006-09-16 19:56:11.000000000 +0200
2 +++ net-snmp-5.4/snmplib/snmpksm.c      2006-12-02 13:29:52.905425500 +0100
3 @@ -63,11 +63,13 @@
4  #ifdef NETSNMP_USE_KERBEROS_HEIMDAL
5  #define CHECKSUM_TYPE(x)       (x)->cksumtype
6  #define CHECKSUM_CONTENTS(x)   ((char *)((x)->checksum.data))
7 +#define CHECKSUM_CONTENTS_L(x) ((x)->checksum.data)
8  #define CHECKSUM_LENGTH(x)     (x)->checksum.length
9  #define TICKET_CLIENT(x)       (x)->client
10  #else                          /* NETSNMP_USE_KERBEROS_HEIMDAL */
11  #define CHECKSUM_TYPE(x)       (x)->checksum_type
12  #define CHECKSUM_CONTENTS(x)   (x)->contents
13 +#define CHECKSUM_CONTENTS_L(x) (x)->contents
14  #define CHECKSUM_LENGTH(x)     (x)->length
15  #define TICKET_CLIENT(x)       (x)->enc_part2->client
16  #endif                         /* NETSNMP_USE_KERBEROS_HEIMDAL */
17 @@ -481,7 +483,7 @@
18      outdata.data = NULL;
19      ivector.length = 0;
20      ivector.data = NULL;
21 -    CHECKSUM_CONTENTS(&pdu_checksum) = NULL;
22 +    CHECKSUM_CONTENTS_L(&pdu_checksum) = NULL;
23  
24      if (!ksm_state) {
25          /*
26 @@ -489,7 +491,7 @@
27           * suppress this (temporarily) while we build the credential info.
28           *   XXX - what about "udp:host" style addresses?
29           */
30 -        colon = strrchr(params->session->peername, ':');
31 +        colon = strrchr(parms->session->peername, ':');
32          if (colon != NULL) {
33              *colon='\0';
34          }
35 @@ -952,7 +954,7 @@
36         /* we did the bogus checksum--don't need to ask for the size again
37          * or initialize cksumtype; just free the bits */
38         free(CHECKSUM_CONTENTS(&pdu_checksum));
39 -       CHECKSUM_CONTENTS(&pdu_checksum) = NULL;
40 +       CHECKSUM_CONTENTS_L(&pdu_checksum) = NULL;
41      }
42      else {
43         retval = krb5_checksumsize(kcontext, cksumtype,
44 @@ -1072,7 +1074,7 @@
45       */
46  
47  #ifndef OLD_HEIMDAL /* since heimdal allocs the mem for us */
48 -    CHECKSUM_CONTENTS(&pdu_checksum) = malloc(CHECKSUM_LENGTH(&pdu_checksum));
49 +    CHECKSUM_CONTENTS_L(&pdu_checksum) = malloc(CHECKSUM_LENGTH(&pdu_checksum));
50  
51      if (!CHECKSUM_CONTENTS(&pdu_checksum)) {
52          DEBUGMSGTL(("ksm", "Unable to malloc %d bytes for checksum\n",
53 @@ -1228,7 +1230,7 @@
54  
55      DEBUGMSGTL(("ksm", "Processing has begun\n"));
56  
57 -    CHECKSUM_CONTENTS(&checksum) = NULL;
58 +    CHECKSUM_CONTENTS_L(&checksum) = NULL;
59      ap_req.data = NULL;
60      ivector.length = 0;
61      ivector.data = NULL;
62 @@ -1347,7 +1349,7 @@
63          goto error;
64      }
65  
66 -    CHECKSUM_CONTENTS(&checksum) = malloc(cksumlength);
67 +    CHECKSUM_CONTENTS_L(&checksum) = malloc(cksumlength);
68      if (!CHECKSUM_CONTENTS(&checksum)) {
69          DEBUGMSGTL(("ksm", "Unable to malloc %d bytes for checksum.\n",
70                      cksumlength));
This page took 0.056929 seconds and 3 git commands to generate.