summaryrefslogtreecommitdiff
path: root/mail/gld/patches
diff options
context:
space:
mode:
authorsalo <salo@pkgsrc.org>2005-04-13 17:00:14 +0000
committersalo <salo@pkgsrc.org>2005-04-13 17:00:14 +0000
commit73ff8288a1b3119bb3acbb5c3a9a02eb6620c229 (patch)
tree31345f7935e7d0268b8cd4c1fed8eb4ce66f47dd /mail/gld/patches
parent343aa370b09b4152588abe849e2e3e39e8acab3c (diff)
downloadpkgsrc-73ff8288a1b3119bb3acbb5c3a9a02eb6620c229.tar.gz
Put the correct content into patch-ab.. *sigh*
Diffstat (limited to 'mail/gld/patches')
-rw-r--r--mail/gld/patches/patch-ab63
1 files changed, 49 insertions, 14 deletions
diff --git a/mail/gld/patches/patch-ab b/mail/gld/patches/patch-ab
index 7714c0cb496..0aa167728aa 100644
--- a/mail/gld/patches/patch-ab
+++ b/mail/gld/patches/patch-ab
@@ -1,19 +1,54 @@
-$NetBSD: patch-ab,v 1.2 2005/04/13 16:36:07 salo Exp $
+$NetBSD: patch-ab,v 1.3 2005/04/13 17:00:14 salo Exp $
---- sockets.h.orig 2005-04-13 12:13:23.000000000 -0400
-+++ sockets.h 2005-04-13 12:06:34.000000000 -0400
-@@ -118,10 +118,10 @@
+--- greylist.c.orig 2005-04-13 05:26:10.000000000 -0400
++++ greylist.c 2005-04-13 12:03:39.000000000 -0400
+@@ -21,8 +21,11 @@
- /* DNS functions */
+ ts=time(0);
+ strncpy(oip,ip,sizeof(oip)-1);
++oip[sizeof(oip)-1] = '\0';
+ strncpy(osender,sender,sizeof(osender)-1);
++osender[sizeof(osender)-1] = '\0';
+ strncpy(orecipient,recipient,sizeof(orecipient)-1);
++orecipient[sizeof(orecipient)-1] = '\0';
--int DnsIp(char *host,char *ip);
--int DnsFQDN(char *host,char *fqdn);
--int DnsName(char *ip,char *fqdn);
--void GetPeerIp(int sock,char *ip,char *fqdn);
-+int DnsIp(char *host,char *ip,size_t);
-+int DnsFQDN(char *host,char *fqdn,size_t);
-+int DnsName(char *ip,char *fqdn,size_t);
-+void GetPeerIp(int sock,char *ip,size_t,char *fqdn,size_t);
+ if(conf->debug==1) printf("%d: Starting the greylist algo\n",pid);
- /* Special Functions */
+@@ -68,10 +71,18 @@
+ if(conf->debug==1) printf("%d: lightgrey on domain is on, let's keep the domain only on recipient and sender\n",pid);
+ domain=(char *)strstr(osender,"@");
+- if(domain!=NULL) strncpy(sender,domain,BLEN-1);
++ if(domain!=NULL)
++ {
++ strncpy(sender,domain,BLEN-1);
++ sender[BLEN-1] = '\0';
++ }
+
+ domain=(char *)strstr(orecipient,"@");
+- if(domain!=NULL) strncpy(recipient,domain,BLEN-1);
++ if(domain!=NULL)
++ {
++ strncpy(recipient,domain,BLEN-1);
++ recipient[BLEN-1] = '\0';
++ }
+ }
+
+ //
+@@ -119,6 +130,7 @@
+ if(domain==NULL) domain=osender;
+
+ strncpy(netw,oip,sizeof(netw)-1);
++ netw[sizeof(netw)-1] = '\0';
+ l=strlen(netw);
+ for(i=l-1;i>=0;i--)
+ if(netw[i]=='.')
+@@ -148,7 +160,7 @@
+ if(x==4)
+ {
+ snprintf(query,sizeof(query)-1,"%d.%d.%d.%d.%s",d,c,b,a,conf->dnswl);
+- n=DnsIp(query,NULL);
++ n=DnsIp(query,NULL, 0);
+ if(conf->debug==1) printf("%d: DNSQuery=(%s) result=%ld\n",pid,query,n);
+ if(n==0)
+ {