View | Details | Raw Unified | Return to bug 85000 | Differences between
and this patch

Collapse All | Expand All

(-)libspf2/Makefile (-2 / +4 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=		libspf2
8
PORTNAME=		libspf2
9
PORTVERSION=		1.0.4
9
PORTVERSION=		1.2.5
10
CATEGORIES=		mail
10
CATEGORIES=		mail
11
MASTER_SITES=		http://www.libspf2.org/%SUBDIR%/
11
MASTER_SITES=		http://www.libspf2.org/%SUBDIR%/
12
MASTER_SITE_SUBDIR=	spf
12
MASTER_SITE_SUBDIR=	spf
Lines 14-21 Link Here
14
MAINTAINER=		mail-libspf2-freebsd-ports@snowchyld.org
14
MAINTAINER=		mail-libspf2-freebsd-ports@snowchyld.org
15
COMMENT=		Sender Rewriting Scheme 2 C Implementation
15
COMMENT=		Sender Rewriting Scheme 2 C Implementation
16
16
17
CONFLICTS=		${PORTNAME}-1.0.*
18
17
INSTALLS_SHLIB=		yes
19
INSTALLS_SHLIB=		yes
18
GNU_CONFIGURE=		yes
20
HAS_CONFIGURE=		yes
19
USE_LIBTOOL_VER=	15
21
USE_LIBTOOL_VER=	15
20
22
21
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
23
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
(-)libspf2/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (libspf2-1.0.4.tar.gz) = 5fe69ba13bf35d505b733247032a8a64
1
MD5 (libspf2-1.2.5.tar.gz) = 06ed6a3b0b54c8590679315ae2d28ad9
2
SIZE (libspf2-1.0.4.tar.gz) = 427613
2
SIZE (libspf2-1.2.5.tar.gz) = 517945
(-)libspf2/files/patch-configure (+54 lines)
Line 0 Link Here
1
--- configure.orig	Wed Feb 23 23:14:51 2005
2
+++ configure	Thu Jul 28 20:12:32 2005
3
@@ -19332,10 +19332,10 @@
4
 
5
 
6
 # This can be used to rebuild libtool when needed
7
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8
+LIBTOOL_DEPS="--disable-ltlibs /usr/local/share/libtool15/ltmain.sh"
9
 
10
 # Always use our own libtool.
11
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12
+LIBTOOL='$(SHELL) /usr/local/bin/libtool15'
13
 
14
 # Prevent multiple expansion
15
 
16
@@ -22349,13 +22349,13 @@
17
 fi
18
 
19
 
20
-echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
21
-echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
22
+echo "$as_me:$LINENO: checking for pthread_create in -pthread" >&5
23
+echo $ECHO_N "checking for pthread_create in -pthread... $ECHO_C" >&6
24
 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
25
   echo $ECHO_N "(cached) $ECHO_C" >&6
26
 else
27
   ac_check_lib_save_LIBS=$LIBS
28
-LIBS="-lpthread  $LIBS"
29
+LIBS="-pthread  $LIBS"
30
 cat >conftest.$ac_ext <<_ACEOF
31
 /* confdefs.h.  */
32
 _ACEOF
33
@@ -22418,7 +22418,7 @@
34
 #define HAVE_LIBPTHREAD 1
35
 _ACEOF
36
 
37
-  LIBS="-lpthread $LIBS"
38
+  LIBS="-pthread $LIBS"
39
 
40
 fi
41
 
42
@@ -23661,12 +23661,6 @@
43
 cat >>conftest.$ac_ext <<_ACEOF
44
 /* end confdefs.h.  */
45
 
46
-	#ifdef HAVE_SYS_SOCKET_H
47
-	# include <sys/socket.h>		/* inet_ functions / structs */
48
-	#endif
49
-	#ifdef HAVE_NETINET_IN_H
50
-	# include <netinet/in.h>		/* inet_ functions / structs */
51
-	#endif
52
 	#ifdef HAVE_ARPA_NAMESER_H
53
 	#  include <arpa/nameser.h> /* DNS HEADER struct */
54
 	#endif
(-)libspf2/files/patch-src::include::spf_server.h (+10 lines)
Line 0 Link Here
1
--- src/include/spf_server.h.orig	Thu Jul 28 18:35:53 2005
2
+++ src/include/spf_server.h	Thu Jul 28 18:35:59 2005
3
@@ -20,7 +20,6 @@
4
 
5
 #include "spf_record.h"
6
 #include "spf_dns.h"
7
-#include "spf_dns_internal.h"
8
 
9
 #ifndef SPF_MAX_DNS_MECH
10
 /* It is a bad idea to change this for two reasons.
(-)libspf2/files/patch-src::libspf2::spf_dns_resolv.c (+28 lines)
Line 0 Link Here
1
--- src/libspf2/spf_dns_resolv.c.orig	Wed Mar  2 22:59:01 2005
2
+++ src/libspf2/spf_dns_resolv.c	Wed Mar  2 23:01:06 2005
3
@@ -77,7 +77,9 @@
4
 static void
5
 SPF_dns_resolv_thread_term(void *arg)
6
 {
7
+#if HAVE_DECL_RES_NINIT
8
 	res_nclose( (struct __res_state *)arg );
9
+#endif
10
 	free(arg);
11
 }
12
 
13
@@ -144,9 +146,15 @@
14
 	if (res_spec == NULL) {
15
 		res_state = (struct __res_state *)
16
 						malloc(sizeof(struct __res_state));
17
+#if HAVE_DECL_RES_NINIT
18
 		if (res_ninit(res_state) != 0) {
19
 			SPF_error("Failed to call res_ninit()");
20
 		}
21
+#else
22
+		if (res_init() != 0) {
23
+			SPF_error("Failed to call res_init()");
24
+		}
25
+#endif
26
 		pthread_setspecific(res_state_key, (void *)res_state);
27
 	}
28
 	else {
(-)libspf2/files/patch-src::libspf2::spf_dns_rr.c (+11 lines)
Line 0 Link Here
1
--- src/libspf2/spf_dns_rr.c.orig	Thu Jul 28 18:40:13 2005
2
+++ src/libspf2/spf_dns_rr.c	Thu Jul 28 18:40:29 2005
3
@@ -45,7 +45,7 @@
4
 				const char *domain)
5
 {
6
 	return SPF_dns_rr_new_init(spf_dns_server,
7
-					domain, ns_t_any, 0, NXDOMAIN);
8
+					domain, ns_t_any, 0, HOST_NOT_FOUND);
9
 }
10
 
11
 SPF_dns_rr_t *
(-)libspf2/files/patch-src::libspf2::spf_request.c (+12 lines)
Line 0 Link Here
1
--- src/libspf2/spf_request.c.orig	Mon Feb 21 23:38:57 2005
2
+++ src/libspf2/spf_request.c	Mon Mar 28 10:37:52 2005
3
@@ -307,6 +307,9 @@
4
 	char			*record;
5
 	size_t			 len;
6
 
7
+	if ( (spf_request == NULL) || (rcpt_to == NULL) )
8
+		return SPF_E_INVALID_OPT;
9
+
10
 	SPF_ASSERT_NOTNULL(spf_request);
11
 	spf_server = spf_request->spf_server;
12
 	SPF_ASSERT_NOTNULL(spf_server);
(-)libspf2/files/patch-src::libspf2::spf_response.c (+12 lines)
Line 0 Link Here
1
--- src/libspf2/spf_response.c.orig	Tue Oct 19 11:05:19 2004
2
+++ src/libspf2/spf_response.c	Mon Mar 28 10:58:26 2005
3
@@ -132,6 +132,9 @@
4
 SPF_result_t
5
 SPF_response_result(SPF_response_t *rp)
6
 {
7
+	if (rp == NULL)
8
+		return SPF_RESULT_NONE;
9
+
10
 	return rp->result;
11
 }
12
 
(-)libspf2/files/patch-src::spf_example::spf_example.c (+69 lines)
Line 0 Link Here
1
--- src/spf_example/spf_example.c.orig	Mon Mar 28 14:17:20 2005
2
+++ src/spf_example/spf_example.c	Mon Mar 28 14:22:46 2005
3
@@ -90,17 +90,17 @@
4
 	"\n"
5
 	"Valid data options are:\n"
6
 	"	-i <IP address>			The IP address that is sending email\n"
7
-	"	-s <email address>		 The email address used as the\n"
8
-	"							   envelope-from.  If no username (local\n"
9
-	"							   part) is given, 'postmaster' will be\n"
10
-	"							   assumed.\n"
11
-	"	-r <email address>		 [optional] The email address used as\n"
12
-	"							   the envelope-to email address, for\n"
13
-	"							   secondary-MX checking.\n"
14
-	"	-h <domain name>		   The domain name given on the SMTP HELO\n"
15
-	"							   command.  This is only needed if the\n"
16
-	"							   -sender option is not given.\n"
17
-	"	-d [debug level]		   debug level.\n"
18
+	"	-s <email address>		The email address used as the\n"
19
+	"					envelope-from.  If no username (local\n"
20
+	"					part) is given, 'postmaster' will be\n"
21
+	"					assumed.\n"
22
+	"	-r <email address>		[optional] The email address used as\n"
23
+	"					the envelope-to email address, for\n"
24
+	"					secondary-MX checking.\n"
25
+	"	-h <domain name>		The domain name given on the SMTP HELO\n"
26
+	"					command.  This is only needed if the\n"
27
+	"					-sender option is not given.\n"
28
+	"	-d [debug level]		debug level.\n"
29
 	);
30
 }
31
 
32
@@ -206,7 +206,7 @@
33
 	 * destroyed when you are finished.
34
 	 */
35
 
36
-	spf_server = SPF_server_new(SPF_DNS_CACHE, 1);
37
+	spf_server = SPF_server_new(SPF_DNS_CACHE, opt_debug);
38
 
39
 	if (spf_server == NULL) {
40
 		fprintf( stderr, "SPF_create_config failed.\n" );
41
@@ -264,10 +264,24 @@
42
 	 * message.
43
 	 */
44
 
45
-	if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
46
-		printf( "Invalid HELO domain.\n" );
47
-		res = 255;
48
-		goto error;
49
+	if (opt_helo == NULL) {
50
+		if (opt_sender != NULL) {
51
+			if (strstr(opt_sender, "@") != NULL) {
52
+				opt_helo = strdup(strstr(opt_sender, "@") + 1);
53
+
54
+				if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
55
+					printf( "Invalid HELO domain.\n" );
56
+					res = 255;
57
+					goto error;
58
+				}
59
+			}
60
+		}
61
+	} else {
62
+		if ( SPF_request_set_helo_dom( spf_request, opt_helo ) ) {
63
+			printf( "Invalid HELO domain.\n" );
64
+			res = 255;
65
+			goto error;
66
+		}
67
 	}
68
 
69
 	/*
(-)libspf2/files/patch-src::spfquery::spfquery.c (+11 lines)
Line 0 Link Here
1
--- src/spfquery/spfquery.c.orig	Thu Jul 28 19:04:46 2005
2
+++ src/spfquery/spfquery.c	Thu Jul 28 19:04:54 2005
3
@@ -261,7 +261,7 @@
4
 response_print_errors(const char *context,
5
 				SPF_response_t *spf_response, SPF_errcode_t err)
6
 {
7
-	SPF_error_t		*spf_error;;
8
+	SPF_error_t		*spf_error;
9
 	int				 i;
10
 
11
 	printf("StartError\n");
(-)libspf2/pkg-descr (-5 / +9 lines)
Lines 1-6 Link Here
1
libsrs2 is the next generation SRS library from the original designer of SRS. 
1
libspf2 implements the Sender Policy Framework, a part of the SPF/SRS 
2
It implements the Sender Rewriting Scheme, a part of the SPF/SRS protocol pair.
2
protocol pair. libspf2 is a library which allows email systems such as 
3
Sendmail, Postfix, Exim, Zmailer and MS Exchange to check SPF records 
4
and make sure that the email is authorized by the domain name that it 
5
is coming from. This prevents email forgery, commonly used by spammers, 
6
scammers and email viruses/worms.
3
7
4
WWW: http://www.libsrs2.org/
8
WWW: http://www.libspf2.org/
5
- snowchyld
9
6
  <mail-libsrs2-freebsd-ports@snowchyld.org>
10
snowchyld <mail-libsrs2-freebsd-ports@snowchyld.org>
(-)libspf2/pkg-plist (-3 / +7 lines)
Lines 1-6 Link Here
1
bin/spf_example
1
bin/spf_example
2
bin/spf_example_2mx
3
bin/spf_example_2mx_static
4
bin/spf_example_static
2
bin/spf_example_static
5
bin/spfd
3
bin/spfd
6
bin/spfd_static
4
bin/spfd_static
Lines 13-22 Link Here
13
include/spf2/spf_dns_cache.h
11
include/spf2/spf_dns_cache.h
14
include/spf2/spf_dns_null.h
12
include/spf2/spf_dns_null.h
15
include/spf2/spf_dns_resolv.h
13
include/spf2/spf_dns_resolv.h
14
include/spf2/spf_dns_rr.h
16
include/spf2/spf_dns_test.h
15
include/spf2/spf_dns_test.h
17
include/spf2/spf_dns_zone.h
16
include/spf2/spf_dns_zone.h
18
include/spf2/spf_lib_version.h
17
include/spf2/spf_lib_version.h
18
include/spf2/spf_log.h
19
include/spf2/spf_record.h
20
include/spf2/spf_request.h
21
include/spf2/spf_response.h
22
include/spf2/spf_server.h
19
@dirrm include/spf2
23
@dirrm include/spf2
20
lib/libspf2.a
24
lib/libspf2.a
21
lib/libspf2.so
25
lib/libspf2.so
22
lib/libspf2.so.1
26
lib/libspf2.so.2

Return to bug 85000