Subversion Repositories libspf2

Compare Revisions

Ignore whitespace Rev 58 → Rev 57

/trunk/debian/patches/ipv6-buffer-miscalculation.patch
File deleted
/trunk/debian/patches/spf_dns-include-std-headers.patch
File deleted
Property changes:
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: series
===================================================================
--- series (revision 58)
+++ series (nonexistent)
@@ -1,3 +0,0 @@
-private-glibc-functions.patch
-spf_dns-include-std-headers.patch
-ipv6-buffer-miscalculation.patch
Index: private-glibc-functions.patch
===================================================================
--- private-glibc-functions.patch (revision 58)
+++ private-glibc-functions.patch (nonexistent)
@@ -1,41 +0,0 @@
-Author: Magnus Holmgren <holmgren@debian.org>
-Description: Avoid linking private glibc functions (specifically __ns_get16).
-
---- trunk~/configure.ac 2008-11-04 16:32:10.000000000 +0100
-+++ trunk/configure.ac 2008-11-15 15:35:38.000000000 +0100
-@@ -272,7 +272,8 @@
- AC_CHECK_FUNCS([gethostbyname inet_ntoa select strrchr strstr strtol])
-
- AC_REPLACE_FUNCS([getopt_long_only strncasecmp])
--AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_get16 __ns_msg_getflag])
-+AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_msg_getflag])
-+AC_LIBOBJ(__ns_get16)
-
- AC_CONFIG_FILES([Makefile
- Doxyfile
-diff -urNad trunk~/configure trunk/configure
---- trunk~/configure 2008-11-04 16:32:56.000000000 +0100
-+++ trunk/configure 2008-11-15 15:35:39.000000000 +0100
-@@ -25752,8 +25752,7 @@
-
-
-
--
--for ac_func in __ns_initparse __ns_name_uncompress __ns_get16 __ns_msg_getflag
-+for ac_func in __ns_initparse __ns_name_uncompress __ns_msg_getflag
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
-@@ -25854,6 +25853,12 @@
- done
-
-
-+case " $LIBOBJS " in
-+ *" __ns_get16.$ac_objext "* ) ;;
-+ *) LIBOBJS="$LIBOBJS __ns_get16.$ac_objext"
-+ ;;
-+esac
-+
-
- ac_config_files="$ac_config_files Makefile Doxyfile src/Makefile src/include/Makefile src/libreplace/Makefile src/libspf2/Makefile src/spfquery/Makefile src/spftest/Makefile src/spfd/Makefile src/spf_example/Makefile"
-
/private-glibc-functions.patch
Property changes:
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: ipv6_buffer_miscalculation.dpatch
===================================================================
--- ipv6_buffer_miscalculation.dpatch (nonexistent)
+++ ipv6_buffer_miscalculation.dpatch (revision 57)
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## ipv6_buffer_miscalculation.dpatch by Matthias Scheler <tron@netbsd.org>
+##
+## DP: Fix an abort() caused by miscalculating the size of an internal buffer.
+## DP: This can crash applications using "libspf2" (e.g. "milter-greylist")
+## DP: in an e-mail gets delivered via SMTP over IPv6 depending on the
+## DP: remote machine's IPv6 address.
+
+@DPATCH@
+--- a/src/libspf2/spf_expand.c 2008-11-03 21:29:00.000000000 +0000
++++ b/src/libspf2/spf_expand.c 2009-09-08 11:27:52.000000000 +0100
+@@ -245,7 +245,7 @@
+ case PARM_CLIENT_IP: /* SMTP client IP */
+ #ifdef COMPUTE
+ if (compute_length) {
+- len = sizeof(ip6_buf);
++ len = sizeof(ip6_rbuf);
+ if (d->dv.url_encode)
+ len *= 3;
+ buflen += len;
Index: 00list
===================================================================
--- 00list (nonexistent)
+++ 00list (revision 57)
@@ -0,0 +1,3 @@
+01_private_glibc_functions
+20_spf_dns_include_std_headers
+ipv6_buffer_miscalculation
Index: 01_private_glibc_functions.dpatch
===================================================================
--- 01_private_glibc_functions.dpatch (nonexistent)
+++ 01_private_glibc_functions.dpatch (revision 57)
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_private_glibc_functions.dpatch by Magnus Holmgren <holmgren@debian.org>
+##
+## DP: Avoid linking private glibc functions (specifically __ns_get16).
+
+@DPATCH@
+diff -urNad trunk~/configure.ac trunk/configure.ac
+--- trunk~/configure.ac 2008-11-04 16:32:10.000000000 +0100
++++ trunk/configure.ac 2008-11-15 15:35:38.000000000 +0100
+@@ -272,7 +272,8 @@
+ AC_CHECK_FUNCS([gethostbyname inet_ntoa select strrchr strstr strtol])
+
+ AC_REPLACE_FUNCS([getopt_long_only strncasecmp])
+-AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_get16 __ns_msg_getflag])
++AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_msg_getflag])
++AC_LIBOBJ(__ns_get16)
+
+ AC_CONFIG_FILES([Makefile
+ Doxyfile
+diff -urNad trunk~/configure trunk/configure
+--- trunk~/configure 2008-11-04 16:32:56.000000000 +0100
++++ trunk/configure 2008-11-15 15:35:39.000000000 +0100
+@@ -25752,8 +25752,7 @@
+
+
+
+-
+-for ac_func in __ns_initparse __ns_name_uncompress __ns_get16 __ns_msg_getflag
++for ac_func in __ns_initparse __ns_name_uncompress __ns_msg_getflag
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ { echo "$as_me:$LINENO: checking for $ac_func" >&5
+@@ -25854,6 +25853,12 @@
+ done
+
+
++case " $LIBOBJS " in
++ *" __ns_get16.$ac_objext "* ) ;;
++ *) LIBOBJS="$LIBOBJS __ns_get16.$ac_objext"
++ ;;
++esac
++
+
+ ac_config_files="$ac_config_files Makefile Doxyfile src/Makefile src/include/Makefile src/libreplace/Makefile src/libspf2/Makefile src/spfquery/Makefile src/spftest/Makefile src/spfd/Makefile src/spf_example/Makefile"
+
/01_private_glibc_functions.dpatch
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: 20_spf_dns_include_std_headers.dpatch
===================================================================
--- 20_spf_dns_include_std_headers.dpatch (nonexistent)
+++ 20_spf_dns_include_std_headers.dpatch (revision 57)
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_spf_dns_include_std_headers.dpatch by Magnus Holmgren <magnus@kibibyte.se>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Include arpa/nameser.h and netdb.h from spf_dns.h instead of defining
+## DP: the constants needed unless certain HAVE_ macros are defined.
+## DP: Updated for libspf2 1.2.8/9 by Scott Kitterman <scott@kitterman.com>
+
+@DPATCH@
+diff -urNad libspf2-1.2.9~/src/include/spf_dns.h libspf2-1.2.9/src/include/spf_dns.h
+--- libspf2-1.2.9~/src/include/spf_dns.h 2008-10-27 12:27:14.000000000 -0400
++++ libspf2-1.2.9/src/include/spf_dns.h 2008-11-04 10:10:58.000000000 -0500
+@@ -63,48 +63,19 @@
+ *
+ */
+
++/* The following two header files might not exist on all platforms,
++ * but at least they exist on Debian with libc6.
++ */
++#include <arpa/nameser.h>
++#include <netdb.h>
+
+ /*
+- * For those who don't have <arpa/nameserv.h>
++ * Type 99 decl does not exist in Debian libc6 (not even 2.7)
+ */
+-
+-/* XXX This should use a more sensible define. */
+-#if !defined( HAVE_NS_TYPE )
+-
+-#define ns_t_invalid 0
+-#define ns_t_a 1
+-#define ns_t_ns 2
+-#define ns_t_cname 5
+-#define ns_t_ptr 12
+-#define ns_t_mx 15
+-#define ns_t_txt 16
+-#define ns_t_aaaa 28
+-/* #define ns_t_a6 38 */
+-#define ns_t_any 255 /**< Wildcard match. */
+-
+-typedef int ns_type;
+-#endif
+-
+ #if ! HAVE_DECL_NS_T_SPF
+ #define ns_t_spf 99
+ #endif
+
+-#if ! HAVE_DECL_NS_T_INVALID
+-#define ns_t_invalid 0
+-#endif
+-
+-
+-/*
+- * For those who don't have <netdb.h>
+- */
+-
+-#if !defined(HAVE_NETDB_H) && !defined(_WIN32)
+-#define NETDB_SUCCESS 0
+-#define HOST_NOT_FOUND 1 /**< NXDOMAIN (authoritative answer)*/
+-#define TRY_AGAIN 2 /**< SERVFAIL (no authoritative answer)*/
+-#define NO_RECOVERY 3 /**< invalid/unimplmeneted query */
+-#define NO_DATA 4 /**< host found, but no RR of req type*/
+-#endif
+ typedef int SPF_dns_stat_t;
+
+ typedef struct SPF_dns_server_struct SPF_dns_server_t;
/20_spf_dns_include_std_headers.dpatch
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property