mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
- Update to 1.2.8
PR: 128298 Submitted by: Jeffrey Goldberg <jeffrey___goldmark.org>
This commit is contained in:
parent
3c9e293a43
commit
2611ce3b28
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=222192
@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= libspf2
|
||||
PORTVERSION= 1.2.5
|
||||
PORTREVISION= 3
|
||||
PORTVERSION= 1.2.8
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.libspf2.org/%SUBDIR%/
|
||||
MASTER_SITE_SUBDIR= spf
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (libspf2-1.2.5.tar.gz) = 06ed6a3b0b54c8590679315ae2d28ad9
|
||||
SHA256 (libspf2-1.2.5.tar.gz) = 879410f87ab4ffd575b1d8149167de6d5eee751199debc039efcc1558c7d0ecb
|
||||
SIZE (libspf2-1.2.5.tar.gz) = 517945
|
||||
MD5 (libspf2-1.2.8.tar.gz) = 824d62a83e76108f8e21a39e1ae2ad62
|
||||
SHA256 (libspf2-1.2.8.tar.gz) = 3b1cc6c891451b97b094b3e3b40348a952048a4d27ca16c0e50d0fb53938e07f
|
||||
SIZE (libspf2-1.2.8.tar.gz) = 575270
|
||||
|
@ -1,49 +0,0 @@
|
||||
--- src/include/spf.h.orig 2008-02-10 11:30:04.000000000 -0200
|
||||
+++ src/include/spf.h 2008-02-10 11:30:20.000000000 -0200
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
/* FYI only -- defaults can't be changed without recompiling the library */
|
||||
#define SPF_DEFAULT_MAX_DNS_MECH 10 /* DoS limit on SPF mechanisms */
|
||||
-#define SPF_DEFAULT_MAX_DNS_PTR 5 /* DoS limit on PTR records */
|
||||
-#define SPF_DEFAULT_MAX_DNS_MX 5 /* DoS limit on MX records */
|
||||
+#define SPF_DEFAULT_MAX_DNS_PTR 10 /* DoS limit on PTR records */
|
||||
+#define SPF_DEFAULT_MAX_DNS_MX 10 /* DoS limit on MX records */
|
||||
#define SPF_DEFAULT_SANITIZE 1
|
||||
#define SPF_DEFAULT_WHITELIST "include:spf.trusted-forwarder.org"
|
||||
#define SPF_EXP_MOD_NAME "exp-text"
|
||||
--- src/include/spf_internal.h.orig 2008-02-10 11:30:28.000000000 -0200
|
||||
+++ src/include/spf_internal.h 2008-02-10 11:31:26.000000000 -0200
|
||||
@@ -57,13 +57,13 @@
|
||||
/* It is a bad idea to change this for the same reasons as mentioned
|
||||
* above for SPF_MAX_DNS_MECH
|
||||
*/
|
||||
-#define SPF_MAX_DNS_PTR 5
|
||||
+#define SPF_MAX_DNS_PTR 10
|
||||
#endif
|
||||
#ifndef SPF_MAX_DNS_MX
|
||||
/* It is a bad idea to change this for the same reasons as mentioned
|
||||
* above for SPF_MAX_DNS_MECH
|
||||
*/
|
||||
-#define SPF_MAX_DNS_MX 5
|
||||
+#define SPF_MAX_DNS_MX 10
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
--- src/include/spf_server.h.orig 2008-02-10 11:31:38.000000000 -0200
|
||||
+++ src/include/spf_server.h 2008-02-10 11:31:55.000000000 -0200
|
||||
@@ -43,13 +43,13 @@
|
||||
/* It is a bad idea to change this for the same reasons as mentioned
|
||||
* above for SPF_MAX_DNS_MECH
|
||||
*/
|
||||
-#define SPF_MAX_DNS_PTR 5
|
||||
+#define SPF_MAX_DNS_PTR 10
|
||||
#endif
|
||||
#ifndef SPF_MAX_DNS_MX
|
||||
/* It is a bad idea to change this for the same reasons as mentioned
|
||||
* above for SPF_MAX_DNS_MECH
|
||||
*/
|
||||
-#define SPF_MAX_DNS_MX 5
|
||||
+#define SPF_MAX_DNS_MX 10
|
||||
#endif
|
||||
|
||||
struct SPF_server_struct {
|
@ -1,15 +0,0 @@
|
||||
--- configure.orig Wed Feb 23 23:14:51 2005
|
||||
+++ configure Thu Jul 28 20:12:32 2005
|
||||
@@ -23661,12 +23661,6 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
- #ifdef HAVE_SYS_SOCKET_H
|
||||
- # include <sys/socket.h> /* inet_ functions / structs */
|
||||
- #endif
|
||||
- #ifdef HAVE_NETINET_IN_H
|
||||
- # include <netinet/in.h> /* inet_ functions / structs */
|
||||
- #endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h> /* DNS HEADER struct */
|
||||
#endif
|
@ -1,13 +0,0 @@
|
||||
--- src/libspf2/spf_interpret.c.orig Wed Dec 13 00:46:58 2006
|
||||
+++ src/libspf2/spf_interpret.c Wed Dec 13 00:47:23 2006
|
||||
@@ -49,8 +49,8 @@
|
||||
SPF_record_t *spf_record;
|
||||
SPF_errcode_t err;
|
||||
char *buf;
|
||||
- int buflen;
|
||||
- int len;
|
||||
+ size_t buflen;
|
||||
+ size_t len;
|
||||
|
||||
SPF_ASSERT_NOTNULL(spf_response);
|
||||
spf_request = spf_response->spf_request;
|
@ -1,10 +0,0 @@
|
||||
--- src/include/spf_server.h.orig Thu Jul 28 18:35:53 2005
|
||||
+++ src/include/spf_server.h Thu Jul 28 18:35:59 2005
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "spf_record.h"
|
||||
#include "spf_dns.h"
|
||||
-#include "spf_dns_internal.h"
|
||||
|
||||
#ifndef SPF_MAX_DNS_MECH
|
||||
/* It is a bad idea to change this for two reasons.
|
@ -1,15 +1,8 @@
|
||||
Index: src/libspf2/spf_dns_resolv.c
|
||||
diff -u -p src/libspf2/spf_dns_resolv.c.orig src/libspf2/spf_dns_resolv.c
|
||||
--- src/libspf2/spf_dns_resolv.c.orig Sat Feb 19 11:38:12 2005
|
||||
+++ src/libspf2/spf_dns_resolv.c Mon Jul 31 14:02:57 2006
|
||||
@@ -71,13 +71,18 @@ typedef struct
|
||||
# define SPF_h_errno h_errno
|
||||
#endif
|
||||
|
||||
+#if HAVE_DECL_RES_NINIT
|
||||
static pthread_once_t res_state_control = PTHREAD_ONCE_INIT;
|
||||
static pthread_key_t res_state_key;
|
||||
|
||||
--- src/libspf2/spf_dns_resolv.c.orig Thu Oct 16 07:02:03 2008
|
||||
+++ src/libspf2/spf_dns_resolv.c Fri Oct 24 12:19:29 2008
|
||||
@@ -92,7 +92,11 @@ static pthread_key_t res_state_key;
|
||||
static void
|
||||
SPF_dns_resolv_thread_term(void *arg)
|
||||
{
|
||||
@ -21,82 +14,12 @@ diff -u -p src/libspf2/spf_dns_resolv.c.orig src/libspf2/spf_dns_resolv.c
|
||||
free(arg);
|
||||
}
|
||||
|
||||
@@ -86,6 +91,7 @@ SPF_dns_resolv_init_key()
|
||||
{
|
||||
pthread_key_create(&res_state_key, SPF_dns_resolv_thread_term);
|
||||
}
|
||||
+#endif
|
||||
|
||||
|
||||
#if 0
|
||||
@@ -130,8 +136,10 @@ SPF_dns_resolv_lookup(SPF_dns_server_t *
|
||||
int rdlen;
|
||||
const u_char *rdata, *rdata_end;
|
||||
|
||||
+#if HAVE_DECL_RES_NINIT
|
||||
void *res_spec;
|
||||
struct __res_state *res_state;
|
||||
+#endif
|
||||
|
||||
SPF_ASSERT_NOTNULL(spf_dns_server);
|
||||
|
||||
@@ -140,10 +148,15 @@ SPF_dns_resolv_lookup(SPF_dns_server_t *
|
||||
SPF_ASSERT_NOTNULL(spfhook);
|
||||
#endif
|
||||
|
||||
+#if HAVE_DECL_RES_NINIT
|
||||
res_spec = pthread_getspecific(res_state_key);
|
||||
if (res_spec == NULL) {
|
||||
res_state = (struct __res_state *)
|
||||
malloc(sizeof(struct __res_state));
|
||||
+ if (res_state == NULL) {
|
||||
+ SPF_error("Failed to call malloc()");
|
||||
+ }
|
||||
+ memset(res_state, 0, sizeof(*res_state));
|
||||
if (res_ninit(res_state) != 0) {
|
||||
SPF_error("Failed to call res_ninit()");
|
||||
}
|
||||
@@ -152,6 +165,11 @@ SPF_dns_resolv_lookup(SPF_dns_server_t *
|
||||
else {
|
||||
res_state = (struct __res_state *)res_spec;
|
||||
}
|
||||
+#else
|
||||
+ if ((_res.options & RES_INIT) == 0 && res_init() != 0) {
|
||||
+ SPF_error("Failed to call res_init()");
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* try resolving the name
|
||||
@@ -486,7 +504,9 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay
|
||||
SPF_dns_resolv_config_t *spfhook;
|
||||
#endif
|
||||
|
||||
+#if HAVE_DECL_RES_NINIT
|
||||
@@ -615,7 +619,7 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay
|
||||
#if HAVE_DECL_RES_NINIT
|
||||
pthread_once(&res_state_control, SPF_dns_resolv_init_key);
|
||||
+#endif
|
||||
|
||||
spf_dns_server = malloc(sizeof(SPF_dns_server_t));
|
||||
if ( spf_dns_server == NULL )
|
||||
@@ -517,19 +537,19 @@ SPF_dns_resolv_new(SPF_dns_server_t *lay
|
||||
spfhook = SPF_voidp2spfhook( spf_dns_server->hook );
|
||||
#endif
|
||||
|
||||
-#if HAVE_DECL_RES_NINIT
|
||||
#if 0
|
||||
+#if HAVE_DECL_RES_NINIT
|
||||
if ( res_ninit( &spfhook->res_state ) != 0 ) {
|
||||
free(spfhook);
|
||||
free(spf_dns_server);
|
||||
return NULL;
|
||||
}
|
||||
-#endif
|
||||
#else
|
||||
if ( res_init() != 0 ) {
|
||||
free( spf_dns_server );
|
||||
- if ( res_init() != 0 ) {
|
||||
+ if ((_res.options & RES_INIT) == 0 && res_init() != 0) {
|
||||
perror("res_init");
|
||||
return NULL;
|
||||
}
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
return spf_dns_server;
|
||||
}
|
||||
|
@ -1,34 +1,5 @@
|
||||
--- src/spf_example/spf_example.c.orig Mon Mar 28 14:17:20 2005
|
||||
+++ src/spf_example/spf_example.c Mon Mar 28 14:22:46 2005
|
||||
@@ -90,17 +90,17 @@
|
||||
"\n"
|
||||
"Valid data options are:\n"
|
||||
" -i <IP address> The IP address that is sending email\n"
|
||||
- " -s <email address> The email address used as the\n"
|
||||
- " envelope-from. If no username (local\n"
|
||||
- " part) is given, 'postmaster' will be\n"
|
||||
- " assumed.\n"
|
||||
- " -r <email address> [optional] The email address used as\n"
|
||||
- " the envelope-to email address, for\n"
|
||||
- " secondary-MX checking.\n"
|
||||
- " -h <domain name> The domain name given on the SMTP HELO\n"
|
||||
- " command. This is only needed if the\n"
|
||||
- " -sender option is not given.\n"
|
||||
- " -d [debug level] debug level.\n"
|
||||
+ " -s <email address> The email address used as the\n"
|
||||
+ " envelope-from. If no username (local\n"
|
||||
+ " part) is given, 'postmaster' will be\n"
|
||||
+ " assumed.\n"
|
||||
+ " -r <email address> [optional] The email address used as\n"
|
||||
+ " the envelope-to email address, for\n"
|
||||
+ " secondary-MX checking.\n"
|
||||
+ " -h <domain name> The domain name given on the SMTP HELO\n"
|
||||
+ " command. This is only needed if the\n"
|
||||
+ " -sender option is not given.\n"
|
||||
+ " -d [debug level] debug level.\n"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
* destroyed when you are finished.
|
||||
*/
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- src/spfquery/spfquery.c.orig Thu Jul 28 19:04:46 2005
|
||||
+++ src/spfquery/spfquery.c Thu Jul 28 19:04:54 2005
|
||||
@@ -261,7 +261,7 @@
|
||||
response_print_errors(const char *context,
|
||||
SPF_response_t *spf_response, SPF_errcode_t err)
|
||||
{
|
||||
- SPF_error_t *spf_error;;
|
||||
+ SPF_error_t *spf_error;
|
||||
int i;
|
||||
|
||||
printf("StartError\n");
|
@ -24,4 +24,4 @@ include/spf2/spf_server.h
|
||||
lib/libspf2.a
|
||||
lib/libspf2.la
|
||||
lib/libspf2.so
|
||||
lib/libspf2.so.2
|
||||
lib/libspf2.so.3
|
||||
|
Loading…
Reference in New Issue
Block a user