View | Details | Raw Unified | Return to bug 154641
Collapse All | Expand All

(-)anubis/Makefile (-83 / +101 lines)
Lines 1-131 Link Here
1
# ex:ts=8
2
# Ports collection makefile for:	anubis
1
# Ports collection makefile for:	anubis
3
# Date created:			Jul 31, 2002
2
# Date created:			Jul 31, 2002
4
# Whom:				ijliao
3
# Whom:				ijliao
5
#
4
#
6
# $FreeBSD: ports/mail/anubis/Makefile,v 1.36 2010/05/31 01:59:35 ade Exp $
5
# $FreeBSD: ports/mail/anubis/Makefile,v 1.36 2010/05/31 01:59:35 ade Exp $
7
#
6
#
8
###########################################################################
9
#
10
# Following compile-time options are available:
11
#
12
# WITH_GNUTLS=yes	Enable GnuTLS API instead of default OpenSSL API
13
# WITHOUT_OPENSSL=yes	Disable the OpenSSL support; unless WITH_GNUTLS
14
#			is specified, this will disables TLS/SSL suport
15
# WITHOUT_GPGME=yes	Disable the GnuPG (GPGME library) support
16
# WITH_PCRE=yes		Enable the PCRE library support
17
#
18
###########################################################################
19
7
20
PORTNAME=		anubis
8
PORTNAME=	anubis
21
PORTVERSION=		3.6.2
9
PORTVERSION=	4.1.1
22
PORTREVISION=	10
10
CATEGORIES=	mail
23
CATEGORIES=		mail
11
MASTER_SITES=	${MASTER_SITE_GNU}
24
MASTER_SITES=		${MASTER_SITE_GNU}
25
MASTER_SITE_SUBDIR=	${PORTNAME}
12
MASTER_SITE_SUBDIR=	${PORTNAME}
26
13
27
MAINTAINER=		ports@FreeBSD.org
14
MAINTAINER=	bsdkaffee@gmail.com
28
COMMENT=		Outgoing SMTP mail processor
15
COMMENT=	Outgoing SMTP mail processor
16
17
USE_RC_SUBR=	anubis
18
USE_AUTOTOOLS=	aclocal autoheader autoconf automake
19
ACLOCAL_ARGS=	-I m4 -I am
20
AUTOMAKE_ARGS=	--force
21
22
LICENSE=	GPLv3
23
LICENSE_FILE=	${WRKSRC}/COPYING
24
25
MAN1=		anubis.1
26
INFO=		anubis
27
PORTEXAMPLES=	1anubisrc 2anubisrc
28
29
CONFIGURE_ENV=	LDFLAGS="-L${LOCALBASE}/lib" \
30
		CPPFLAGS="-I${LOCALBASE}/include"
31
MAKE_JOBS_UNSAFE=	yes
32
33
OPTIONS=	NLS "Native language support" on \
34
		GUILE "Guile support" on \
35
		GPGME "GPG support via gpgme" on \
36
		GNUTLS "GNU TLS support" on \
37
		GSASL "GSASL support (required for databases)" on \
38
		GDBM "GDBM database support" off \
39
		MYSQL "MySQL database support" off \
40
		PGSQL "PostgreSQL database support" off \
41
		PCRE "Perl-style regular expressions" off \
42
		PAM "PAM support" off \
43
		SOCKS "SOCKS proxy support" off \
44
		TCPWRAP "TCP wrappers" off
45
46
.include <bsd.port.options.mk>
29
47
30
GNU_CONFIGURE=		yes
48
# Default requirement for anubis rc script
31
CONFIGURE_ENV=		MAKEINFO="makeinfo --no-split" LDFLAGS="${LDFLAGS}" \
49
_REQUIRE=       mail
32
			CFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}"
33
LDFLAGS+=		-L${LOCALBASE}/lib
34
50
35
.if defined(WITHOUT_NLS)
51
.if defined(WITHOUT_NLS)
36
CONFIGURE_ARGS+=	--disable-nls
52
CONFIGURE_ARGS+=--disable-nls
37
PLIST_SUB+=		NLS="@comment "
53
PLIST_SUB+=	NLS="@comment "
38
.else
54
.else
39
USE_ICONV=		yes
55
USE_ICONV=	yes
40
USE_GETTEXT=		yes
56
USE_GETTEXT=	yes
41
PLIST_SUB+=		NLS=""
57
PLIST_SUB+=	NLS=""
42
.endif
58
.endif
43
59
44
# Select TLS/SSL API: either OpenSSL (default), GnuTLS, or none
60
.if defined(WITHOUT_GUILE)
45
.if defined(WITH_GNUTLS)
61
CONFIGURE_ARGS+=--without-guile
46
LIB_DEPENDS+=		gnutls:${PORTSDIR}/security/gnutls
62
PLIST_SUB+=	GUILE="@comment "
47
.elif !defined(WITHOUT_OPENSSL)
48
USE_OPENSSL=		yes
49
CONFIGURE_ARGS+=	--with-openssl
50
.else
63
.else
51
CONFIGURE_ARGS+=	--without-gnutls
64
LIB_DEPENDS+=	guile:${PORTSDIR}/lang/guile
65
PORTEXAMPLES+=	anubis.scm anubisrc.guile
66
PLIST_SUB+=	GUILE=""
52
.endif
67
.endif
53
68
54
# GPGME
55
.if defined(WITHOUT_GPGME)
69
.if defined(WITHOUT_GPGME)
56
CONFIGURE_ARGS+=	--without-gpgme
70
CONFIGURE_ARGS+=--without-gpgme
57
.else
71
.else
58
LIB_DEPENDS+=		gpgme03.9:${PORTSDIR}/security/gpgme03
72
LIB_DEPENDS+=	gpgme.18:${PORTSDIR}/security/gpgme
59
CFLAGS+=		-I${LOCALBASE}/include/gpgme03
60
.endif
73
.endif
61
74
62
# PCRE
75
.if defined(WITHOUT_GNUTLS)
63
.if defined(WITH_PCRE)
76
CONFIGURE_ARGS+=--without-gnutls
64
LIB_DEPENDS+=		pcre:${PORTSDIR}/devel/pcre
77
.else
65
CONFIGURE_ARGS+=	--with-pcre
78
LIB_DEPENDS+=	gnutls.40:${PORTSDIR}/security/gnutls
66
.endif
79
.endif
67
80
68
# PAM
81
.if defined(WITH_GDBM)
69
.if exists(/usr/lib/libpam.so)
82
.undef WITHOUT_GSASL
70
WITH_PAM=		yes
83
WITH_GSASL=	yes
71
CONFIGURE_ARGS+=	--with-pam
84
LIB_DEPENDS+=	gdbm:${PORTSDIR}/databases/gdbm
72
PLIST_SUB+=		PAM=""
85
CONFIGURE_ARGS+=--with-gdbm
73
.else
74
PLIST_SUB+=		PAM="@comment "
75
.endif
86
.endif
76
87
77
# TCP Wrappers
88
.if defined(WITH_MYSQL)
78
.if exists(/usr/include/tcpd.h)
89
.undef WITHOUT_GSASL
79
WITH_TCP_WRAPPERS=	yes
90
WITH_GSASL=	yes
80
CONFIGURE_ARGS+=	--with-tcp-wrappers
91
USE_MYSQL=	yes
92
CONFIGURE_ARGS+=--with-mysql
93
_REQUIRE+=	mysql
81
.endif
94
.endif
82
95
83
MAN1=	anubis.1
96
.if defined(WITH_PGSQL)
84
INFO=	anubis
97
.undef WITHOUT_GSASL
85
DOCS=	AUTHORS INSTALL NEWS README THANKS TODO
98
WITH_GSASL=	yes
99
USE_PGSQL=	yes
100
CONFIGURE_ARGS+=--with-postgres
101
_REQUIRE+=	postgresql
102
.endif
86
103
87
pre-configure:
104
.if defined(WITHOUT_GSASL)
88
	@${ECHO_MSG} ""
105
CONFIGURE_ARGS+=--without-gsasl
89
.if defined(WITH_GNUTLS)
106
PLIST_SUB+=	GSASL="@comment "
90
	@${ECHO_MSG} "Using GnuTLS as TLS/SSL API"
91
.elif !defined(WITHOUT_OPENSSL)
92
	@${ECHO_MSG} "Using OpenSSL as TLS/SSL API"
93
.else
107
.else
94
	@${ECHO_MSG} "Disabling TLS/SSL support"
108
LIB_DEPENDS+=	gsasl.14:${PORTSDIR}/security/gsasl
95
.endif
109
PLIST_SUB+=	GSASL=""
96
.if defined(WITHOUT_GPGME)
97
	@${ECHO_MSG} "Disabling GnuPG (GPGME) support"
98
.endif
110
.endif
111
99
.if defined(WITH_PCRE)
112
.if defined(WITH_PCRE)
100
	@${ECHO_MSG} "Enabling PCRE support"
113
LIB_DEPENDS+=	pcre:${PORTSDIR}/devel/pcre
101
.else
114
CONFIGURE_ARGS+=--with-pcre
102
	@${ECHO_MSG} "You could define WITH_PCRE to enable PCRE support"
103
.endif
115
.endif
104
.if defined(WITH_PAM)
116
105
	@${ECHO_MSG} "Enabling PAM support"
117
.if defined(WITH_PAM) && exists(/usr/lib/libpam.so)
118
CONFIGURE_ARGS+=--with-pam
119
PORTEXAMPLES+=	pam
106
.endif
120
.endif
107
.if defined(WITH_TCP_WRAPPERS)
121
108
	@${ECHO_MSG} "Enabling TCP wrappers support"
122
.if defined(WITH_TCPWRAP) && exists(/usr/include/tcpd.h)
123
CONFIGURE_ARGS+=--with-tcp-wrappers
124
.endif
125
126
.if defined(WITH_SOCKS)
127
CONFIGURE_ARGS+=--with-socks-proxy
109
.endif
128
.endif
110
	@${ECHO_MSG} ""
129
111
	@${RM} -f ${WRKSRC}/doc/anubis.info*
130
SUB_LIST+=	REQUIRE="${_REQUIRE}"
112
131
113
post-patch:
132
post-patch:
114
	@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h
133
	@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h
115
	@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" ${FILESDIR}/anubis.sh > \
116
		${WRKSRC}/anubis.sh
117
134
135
.if !defined(NOPORTEXAMPLES)
118
post-install:
136
post-install:
119
	${INSTALL_SCRIPT} ${WRKSRC}/anubis.sh ${PREFIX}/etc/rc.d/anubis.sh.sample
120
	@${MKDIR} ${EXAMPLESDIR}
137
	@${MKDIR} ${EXAMPLESDIR}
121
	${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR}
138
	${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR}
139
.if defined(WITH_GUILE)
140
	cd ${WRKSRC}/examples && \
141
		${INSTALL_DATA} anubis.scm anubisrc.guile ${EXAMPLESDIR}
142
.endif
122
.if defined(WITH_PAM)
143
.if defined(WITH_PAM)
123
	@${MKDIR} ${EXAMPLESDIR}/pam
144
	@${MKDIR} ${EXAMPLESDIR}/pam
124
	${INSTALL_DATA} ${WRKSRC}/examples/pam/* ${EXAMPLESDIR}/pam
145
	${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${EXAMPLESDIR}/pam
125
.endif
146
.endif
126
.if !defined(NOPORTDOCS)
127
	@${MKDIR} ${DOCSDIR}
128
	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
129
.endif
147
.endif
130
148
131
.include <bsd.port.mk>
149
.include <bsd.port.mk>
(-)anubis/distinfo (-3 / +2 lines)
Lines 1-3 Link Here
1
MD5 (anubis-3.6.2.tar.gz) = 9e705e38cafe4a57025a6ad89fd73226
1
SHA256 (anubis-4.1.1.tar.gz) = 93ef7a2d8bc3b50cd2e228cfe27e296ee14accadf8533bad9b2beee88a96e8fa
2
SHA256 (anubis-3.6.2.tar.gz) = bb821f1e45a9cba2c6e3b9328b94e7327e3b69317a0a46d0ccdf0d27b1bb465e
2
SIZE (anubis-4.1.1.tar.gz) = 1104272
3
SIZE (anubis-3.6.2.tar.gz) = 419210
(-)anubis/files/anubis.in (+31 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
# PROVIDE: anubis
7
# REQUIRE: %%REQUIRE%%
8
# KEYWORD: shutdown
9
10
#
11
# Add the following lines to /etc/rc.conf to enable anubis:
12
#
13
# anubis_enable (bool):	Set to "YES" to enable anubis.
14
#			Default is "NO".
15
# anubis_conf (file):	Set location of anubisrc.
16
#			Default is "%%PREFIX%%/etc/anubisrc"
17
#
18
19
. /etc/rc.subr
20
21
name="anubis"
22
rcvar=`set_rcvar`
23
24
load_rc_config ${name}
25
26
: ${anubis_enable="NO"}
27
: ${anubis_conf="%%PREFIX%%/etc/anubisrc"}
28
29
required_files="${anubis_conf}"
30
command="%%PREFIX%%/sbin/${name}"
31
run_rc_command "$1"
(-)anubis/files/anubis.sh (-15 lines)
Lines 1-15 Link Here
1
#!/bin/sh
2
3
case "$1" in
4
start)
5
	[ -x %%PREFIX%%/sbin/anubis ] && %%PREFIX%%/sbin/anubis > /dev/null && echo -n ' anubis'
6
	;;
7
stop)
8
	killall anubis
9
	;;
10
*)
11
	echo "Usage: `basename $0` {start|stop}" >&2
12
	;;
13
esac
14
15
exit 0
(-)anubis/files/patch-config.h.in (+23 lines)
Line 0 Link Here
1
--- ./config.h.in.orig	2008-12-19 13:30:37.000000000 -0500
2
+++ ./config.h.in	2011-02-09 20:52:34.000000000 -0500
3
@@ -180,9 +180,6 @@
4
 /* Define to 1 if you have the `pam' library (-lpam). */
5
 #undef HAVE_LIBPAM
6
 
7
-/* Define to 1 if you have the `pam_misc' library (-lpam_misc). */
8
-#undef HAVE_LIBPAM_MISC
9
-
10
 /* Define to 1 if you have the `pcre' library (-lpcre). */
11
 #undef HAVE_LIBPCRE
12
 
13
@@ -252,8 +249,8 @@
14
 /* Define to 1 if you have the <security/pam_appl.h> header file. */
15
 #undef HAVE_SECURITY_PAM_APPL_H
16
 
17
-/* Define to 1 if you have the <security/pam_misc.h> header file. */
18
-#undef HAVE_SECURITY_PAM_MISC_H
19
+/* Define to 1 if you have the <security/openpam.h> header file. */
20
+#undef HAVE_SECURITY_OPENPAM_H
21
 
22
 /* Define to 1 if you have the `setegid' function. */
23
 #undef HAVE_SETEGID
(-)anubis/files/patch-configure (-28 lines)
Lines 1-28 Link Here
1
--- configure.orig	Mon Dec 20 20:32:43 2004
2
+++ configure	Mon Dec 20 20:34:13 2004
3
@@ -8603,13 +8603,13 @@
4
 
5
 else
6
 
7
-echo "$as_me:$LINENO: checking for main in -lgpgme" >&5
8
-echo $ECHO_N "checking for main in -lgpgme... $ECHO_C" >&6
9
+echo "$as_me:$LINENO: checking for main in -lgpgme03" >&5
10
+echo $ECHO_N "checking for main in -lgpgme03... $ECHO_C" >&6
11
 if test "${ac_cv_lib_gpgme_main+set}" = set; then
12
   echo $ECHO_N "(cached) $ECHO_C" >&6
13
 else
14
   ac_check_lib_save_LIBS=$LIBS
15
-LIBS="-lgpgme  $LIBS"
16
+LIBS="-lgpgme03  $LIBS"
17
 cat >conftest.$ac_ext <<_ACEOF
18
 #line $LINENO "configure"
19
 /* confdefs.h.  */
20
@@ -8656,7 +8656,7 @@
21
 #define HAVE_LIBGPGME 1
22
 _ACEOF
23
 
24
-  LIBS="-lgpgme $LIBS"
25
+  LIBS="-lgpgme03 $LIBS"
26
 
27
 else
28
   with_gpgme=no
(-)anubis/files/patch-configure.ac (+92 lines)
Line 0 Link Here
1
--- ./configure.ac.orig	2008-12-16 11:21:54.000000000 -0500
2
+++ ./configure.ac	2011-02-09 20:52:34.000000000 -0500
3
@@ -77,7 +77,6 @@
4
 ])
5
 
6
 AC_CHECK_LIB(socket, socket)
7
-AC_CHECK_LIB(nsl, gethostbyaddr)
8
 
9
 AC_SUBST(INCLUDES)
10
 case $build in
11
@@ -143,10 +142,10 @@
12
 else
13
  AC_PATH_PROG(GPG, gpg)
14
  findgpgmedir() { :
15
-  if test -f "$1/include/gpgme.h"; then
16
+  if test -f "$1/include/gpgme/gpgme.h"; then
17
    gpgmedir=1
18
    INCLUDES="$INCLUDES -I$1/include"
19
-   AC_MSG_CHECKING(for $1/include/gpgme.h)
20
+   AC_MSG_CHECKING(for $1/include/gpgme/gpgme.h)
21
    AC_MSG_RESULT([yes])
22
    return 0
23
   fi
24
@@ -158,7 +157,7 @@
25
  if test $gpgmedir; then
26
   AC_DEFINE(HAVE_GPGME_H, 1, [Define to 1 if HAVE_GPGME_H is requested.])
27
  else
28
-  AC_CHECK_HEADERS(gpgme.h)
29
+  AC_CHECK_HEADERS(gpgme/gpgme.h)
30
  fi
31
  ANUBIS_GPGFILES='$(GPGFILES)'
32
  M4_DEFS="$M4_DEFS -DWITH_GPG"
33
@@ -189,6 +188,7 @@
34
 WITH_MYSQL=no
35
 WITH_POSTGRES=no
36
 WITH_GDBM=no
37
+WITH_GSASL=no
38
 
39
 dnl Use option --with-gsasl to compile GSASL library support.
40
 MU_CHECK_GSASL(0.2.3, [
41
@@ -199,11 +199,21 @@
42
     ANUBIS_BIN_ADM='$(adm_bin_programs)'
43
     M4_DEFS="$M4_DEFS -DWITH_GSASL"
44
 
45
+    AC_ARG_WITH(gdbm,
46
+        AC_HELP_STRING([--with-gdbm],
47
+        [Configure to work with GDBM]),
48
+        [with_gdbm=${withval}],
49
+        [with_gdbm=no])
50
+    if test "$with_gdbm" = "yes"; then
51
     AC_CHECK_LIB(gdbm, gdbm_open,
52
                  [WITH_GDBM=yes
53
                   LIBS="$LIBS -lgdbm"
54
                   AC_DEFINE(HAVE_LIBGDBM,1,[Define if you have libgdbm])],
55
-                 [AC_MSG_RESULT([Disabling GDBM support...])])
56
+                  with_gdbm=no)
57
+    fi
58
+    if test "$with_gdbm" = "yes"; then
59
+      AC_MSG_RESULT([Enabling GDBM support...])
60
+    fi
61
 
62
     AC_ARG_WITH(mysql,
63
 	AC_HELP_STRING([--with-mysql],
64
@@ -277,7 +287,8 @@
65
 if test $with_gnutls = yes; then
66
   AC_CHECK_HEADERS(gnutls/gnutls.h)
67
   if test $ac_cv_header_gnutls_gnutls_h != no; then
68
-    AM_PATH_LIBGNUTLS("1.0.0",
69
+    PKG_CHECK_MODULES([LIBGNUTLS],
70
+                      [gnutls >= 1.0.0],
71
                       [M4_DEFS="$M4_DEFS -DWITH_SSL -DWITH_GNUTLS"
72
                       AC_DEFINE(USE_GNUTLS, 1,
73
                                 [Define to 1 if USE_GNUTLS is requested.])],
74
@@ -327,8 +338,8 @@
75
 	[with_pam=no])
76
 if test "$with_pam" = "yes"; then
77
  AC_CHECK_LIB(pam, main,, with_pam=no)
78
- AC_CHECK_LIB(pam_misc, main,, with_pam=no)
79
- AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h,, with_pam=no)
80
+ AC_CHECK_HEADER(security/pam_appl.h,, with_pam=no)
81
+ AC_CHECK_HEADER(security/openpam.h,, with_pam=no, [ #include <security/pam_appl.h> ])
82
 fi
83
 if test "$with_pam" = "yes"; then
84
  AC_MSG_RESULT([Enabling PAM support...])
85
@@ -342,7 +353,6 @@
86
 	[with_tcp_wrappers=no])
87
 if test "$with_tcp_wrappers" = "yes"; then
88
  AC_CHECK_LIB(wrap, main,, with_tcp_wrappers=no)
89
- AC_CHECK_LIB(nsl, main,, with_tcp_wrappers=no)
90
  AC_CHECK_HEADERS(tcpd.h,, with_tcp_wrappers=no)
91
 fi
92
 if test "$with_tcp_wrappers" = "yes"; then
(-)anubis/files/patch-src__env.c (+11 lines)
Line 0 Link Here
1
--- ./src/env.c.orig	2008-12-16 16:44:38.000000000 -0500
2
+++ ./src/env.c	2011-02-09 20:52:34.000000000 -0500
3
@@ -32,7 +32,7 @@
4
 #ifdef HAVE_PAM
5
 pam_handle_t *pamh;
6
 static struct pam_conv conv = {
7
-  misc_conv,
8
+  openpam_ttyconv,
9
   NULL
10
 };
11
 #endif /* HAVE_PAM */
(-)anubis/files/patch-src__gpg.c (+11 lines)
Line 0 Link Here
1
--- ./src/gpg.c.orig	2008-12-16 11:21:54.000000000 -0500
2
+++ ./src/gpg.c	2011-02-09 20:52:34.000000000 -0500
3
@@ -23,7 +23,7 @@
4
 #include "rcfile.h"
5
 
6
 #ifdef HAVE_GPG
7
-#include <gpgme.h>
8
+#include <gpgme/gpgme.h>
9
 #define obstack_chunk_alloc malloc
10
 #define obstack_chunk_free free
11
 #include <obstack.h>
(-)anubis/files/patch-src__headers.h (+27 lines)
Line 0 Link Here
1
--- ./src/headers.h.orig	2008-12-16 11:21:54.000000000 -0500
2
+++ ./src/headers.h	2011-02-09 20:52:34.000000000 -0500
3
@@ -51,11 +51,11 @@
4
 # else
5
 #  error POSIX Regular Expressions are required!
6
 # endif	/* HAVE_REGEX_H and HAVE_REGCOMP */
7
-# if defined(HAVE_LIBPAM) && defined(HAVE_LIBPAM_MISC)
8
-#  if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
9
+# if defined(HAVE_LIBPAM)
10
+#  if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_OPENPAM_H)
11
 #   define HAVE_PAM
12
-#  endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_PAM_MISC_H */
13
-# endif	/* HAVE_LIBPAM and HAVE_LIBPAM_MISC */
14
+#  endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_OPENPAM_H */
15
+# endif	/* HAVE_LIBPAM */
16
 # if defined(HAVE_LIBWRAP) && defined(HAVE_TCPD_H)
17
 #  define USE_LIBWRAP
18
 # endif	/* HAVE_LIBWRAP and HAVE_TCPD_H */
19
@@ -121,7 +121,7 @@
20
 
21
 #ifdef HAVE_PAM
22
 # include <security/pam_appl.h>
23
-# include <security/pam_misc.h>
24
+# include <security/openpam.h>
25
 #endif /* HAVE_PAM */
26
 
27
 #if defined(WITH_GSASL)
(-)anubis/files/patch-src_auth.c (-114 lines)
Lines 1-114 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_auth.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/auth.c.orig	Wed Dec  4 22:43:34 2002
5
+++ src/auth.c	Sun Mar  7 15:10:48 2004
6
@@ -42,6 +42,66 @@
7
  IDENT protocol support
8
 ************************/
9
 
10
+#define USERNAME_C "USERID :"
11
+
12
+/* If the reply matches sscanf expression
13
+   
14
+      "%*[^:]: USERID :%*[^:]:%s"
15
+
16
+   and the length of "%s" part does not exceed size-1 bytes,
17
+   copies this part to USERNAME and returns 0. Otherwise,
18
+   returns 1 */
19
+
20
+static int
21
+ident_extract_username(char *reply, char *username, size_t size)
22
+{
23
+	char *p;
24
+
25
+	p = strchr (reply, ':');
26
+	if (!p)
27
+		return 1;
28
+	if (p[1] != ' '
29
+	    || strncmp (p + 2, USERNAME_C, sizeof (USERNAME_C) - 1))
30
+		return 1;
31
+	p += 2 + sizeof (USERNAME_C) - 1;
32
+	p = strchr (p, ':');
33
+	if (!p)
34
+		return 1;
35
+	p++;
36
+	if (strlen (p) >= size)
37
+		return 1;
38
+	strcpy(username, p);
39
+	return 0;
40
+}
41
+
42
+/* If the reply matches sscanf expression
43
+
44
+      "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s"
45
+
46
+   and the length of "%s" part does not exceed size-1 bytes,
47
+   copies this part to USERNAME and returns 0. Otherwise,
48
+   returns 1 */
49
+
50
+static int
51
+crypt_extract_username(char *reply, char *username, size_t size)
52
+{
53
+	int i;
54
+	char *p = reply;
55
+#define skip_word(c) while (*c && (*c) != ' ') c++
56
+
57
+	/* Skip five words */
58
+	for (i = 0; i < 5; i++) {
59
+		skip_word(p);
60
+		if (!*p++)
61
+			return 1;
62
+	}
63
+	
64
+	if (strlen (p) >= size)
65
+		return 1;
66
+	strcpy(username, p);
67
+	return 0;
68
+}
69
+
70
 int
71
 auth_ident(struct sockaddr_in *addr, char *user, int size)
72
 {
73
@@ -51,7 +111,8 @@
74
 	int sd = 0;
75
 
76
 	if ((sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
77
-		anubis_error(SOFT, _("IDENT: socket() failed: %s."), strerror(errno));
78
+		anubis_error(SOFT, _("IDENT: socket() failed: %s."),
79
+			     strerror(errno));
80
 		return 0;
81
 	}
82
 	memcpy(&ident, addr, sizeof(ident));
83
@@ -69,11 +130,7 @@
84
 	info(VERBOSE, _("IDENT: connected to %s:%u"),
85
 	inet_ntoa(ident.sin_addr), ntohs(ident.sin_port));
86
 
87
-	#ifdef HAVE_SNPRINTF
88
 	snprintf(buf, LINEBUFFER,
89
-	#else
90
-	sprintf(buf,
91
-	#endif /* HAVE_SNPRINTF */
92
 		"%u , %u"CRLF, ntohs(addr->sin_port), session.tunnel_port);
93
 
94
 	if (send(sd, buf, strlen(buf), 0) == -1) {
95
@@ -89,7 +146,8 @@
96
 	close_socket(sd);
97
 	memset(user, 0, size);
98
 
99
-	if (sscanf(buf, "%*[^:]: USERID :%*[^:]:%s", user) != 1) {
100
+	remcrlf (buf);
101
+	if (ident_extract_username(buf, user, size)) {
102
 		info(VERBOSE, _("IDENT: incorrect data."));
103
 		return 0;
104
 	}
105
@@ -105,7 +163,8 @@
106
 		if (rs == -1)
107
 			return 0;
108
 
109
-		if (sscanf(buf, "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s", user) != 1) {
110
+		remcrlf (buf);
111
+		if (crypt_extract_username(buf, user, size)) {
112
 			info(VERBOSE, _("IDENT: incorrect data (DES deciphered)."));
113
 			return 0;
114
 		}
(-)anubis/files/patch-src_errs.c (-14 lines)
Lines 1-14 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_errs.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/errs.c.orig	Wed Dec  4 22:42:02 2002
5
+++ src/errs.c	Sun Mar  7 15:10:48 2004
6
@@ -51,7 +51,7 @@
7
 			if (options.slogfile)
8
 				filelog(options.slogfile, txt);
9
 			else
10
-				syslog(LOG_ERR | LOG_MAIL, txt);
11
+				syslog(LOG_ERR | LOG_MAIL, "%s", txt);
12
 
13
 			if (options.ulogfile && options.uloglevel >= FAILS)
14
 				filelog(options.ulogfile, txt);
(-)anubis/files/patch-src_log.c (-14 lines)
Lines 1-14 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_log.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/log.c.orig	Wed Dec  4 22:42:26 2002
5
+++ src/log.c	Sun Mar  7 15:10:48 2004
6
@@ -70,7 +70,7 @@
7
 		if (options.slogfile)
8
 			filelog(options.slogfile, txt);
9
 		else
10
-			syslog(LOG_INFO | LOG_MAIL, txt);
11
+			syslog(LOG_INFO | LOG_MAIL, "%s", txt);
12
 
13
 		if (options.ulogfile && options.uloglevel >= ALL)
14
 			filelog(options.ulogfile, txt);
(-)anubis/files/patch-src_net.c (-22 lines)
Lines 1-22 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_net.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/net.c.orig	Wed Dec 11 15:37:56 2002
5
+++ src/net.c	Sun Mar  7 14:55:10 2004
6
@@ -122,6 +122,7 @@
7
 	int sd = 0;
8
 	unsigned long inaddr;
9
 	struct sockaddr_in addr;
10
+	int true = 1;
11
 
12
 	memset(&addr, 0, sizeof(addr));
13
 	addr.sin_family = AF_INET;
14
@@ -152,6 +153,8 @@
15
 	}
16
 	else
17
 		addr.sin_addr.s_addr = htonl(INADDR_ANY);
18
+
19
+	setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
20
 
21
 	if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)))
22
 		anubis_error(HARD, _("bind() failed: %s."), strerror(errno));
(-)anubis/files/patch-src_ssl.c (-14 lines)
Lines 1-14 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_ssl.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/ssl.c.orig	Wed Dec  4 22:40:45 2002
5
+++ src/ssl.c	Sun Mar  7 15:10:48 2004
6
@@ -64,7 +64,7 @@
7
 	if (options.termlevel != SILENT) {
8
 		#ifdef HAVE_SYSLOG
9
 		if ((topt & T_DAEMON) && !(topt & T_FOREGROUND))
10
-			syslog(LOG_ERR | LOG_MAIL, string_error);
11
+			syslog(LOG_ERR | LOG_MAIL, "%s", string_error);
12
 		else
13
 		#endif /* HAVE_SYSLOG */
14
 			mprintf(">>%s", string_error);
(-)anubis/files/patch-src_tunnel.c (-20 lines)
Lines 1-20 Link Here
1
2
$FreeBSD: ports/mail/anubis/files/patch-src_tunnel.c,v 1.1 2004/03/07 20:49:32 naddy Exp $
3
4
--- src/tunnel.c.orig	Sun Dec  8 19:04:51 2002
5
+++ src/tunnel.c	Sun Mar  7 14:55:10 2004
6
@@ -554,9 +554,11 @@
7
 				ptr1 = strstr(boundary_buf, "boundary=");
8
 				if (ptr1 == 0) {
9
 					plist = plist->next;
10
-					safe_strcpy(boundary_buf, plist->line);
11
-					change_to_lower(boundary_buf);
12
-					ptr1 = strstr(boundary_buf, "boundary=");
13
+					if (plist) {
14
+						safe_strcpy(boundary_buf, plist->line);
15
+						change_to_lower(boundary_buf);
16
+						ptr1 = strstr(boundary_buf, "boundary=");
17
+					}
18
 				}
19
 
20
 				if (ptr1) {
(-)anubis/pkg-plist (-16 / +21 lines)
Lines 1-19 Link Here
1
@comment $FreeBSD: ports/mail/anubis/pkg-plist,v 1.7 2004/10/13 12:34:06 sergei Exp $
1
@stopdaemon anubis
2
%%GSASL%%bin/anubisusr
3
bin/msg2smtp.pl
2
sbin/anubis
4
sbin/anubis
3
etc/rc.d/anubis.sh.sample
5
%%GSASL%%sbin/anubisadm
4
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
6
%%GUILE%%share/anubis/entire-msg.scm
5
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
7
%%GUILE%%share/anubis/remailer.scm
6
%%PORTDOCS%%%%DOCSDIR%%/NEWS
8
%%GUILE%%share/anubis/rot-13.scm
7
%%PORTDOCS%%%%DOCSDIR%%/README
9
%%NLS%%share/locale/da/LC_MESSAGES/anubis.mo
8
%%PORTDOCS%%%%DOCSDIR%%/THANKS
10
%%NLS%%share/locale/de/LC_MESSAGES/anubis.mo
9
%%PORTDOCS%%%%DOCSDIR%%/TODO
10
%%PORTDOCS%%@dirrm %%DOCSDIR%%
11
%%EXAMPLESDIR%%/1anubisrc
12
%%EXAMPLESDIR%%/2anubisrc
13
%%PAM%%%%EXAMPLESDIR%%/pam/anubis
14
%%PAM%%%%EXAMPLESDIR%%/pam/anubis.allow
15
%%PAM%%%%EXAMPLESDIR%%/pam/anubis.deny
16
%%PAM%%@dirrm %%EXAMPLESDIR%%/pam
17
@dirrm %%EXAMPLESDIR%%
18
%%NLS%%share/locale/fr/LC_MESSAGES/anubis.mo
11
%%NLS%%share/locale/fr/LC_MESSAGES/anubis.mo
12
%%NLS%%share/locale/id/LC_MESSAGES/anubis.mo
13
%%NLS%%share/locale/it/LC_MESSAGES/anubis.mo
14
%%NLS%%share/locale/ms/LC_MESSAGES/anubis.mo
15
%%NLS%%share/locale/nb/LC_MESSAGES/anubis.mo
16
%%NLS%%share/locale/nl/LC_MESSAGES/anubis.mo
17
%%NLS%%share/locale/pl/LC_MESSAGES/anubis.mo
18
%%NLS%%share/locale/ro/LC_MESSAGES/anubis.mo
19
%%NLS%%share/locale/ru/LC_MESSAGES/anubis.mo
20
%%NLS%%share/locale/sv/LC_MESSAGES/anubis.mo
19
%%NLS%%share/locale/tr/LC_MESSAGES/anubis.mo
21
%%NLS%%share/locale/tr/LC_MESSAGES/anubis.mo
22
%%NLS%%share/locale/uk/LC_MESSAGES/anubis.mo
23
%%NLS%%share/locale/vi/LC_MESSAGES/anubis.mo
24
@dirrm share/anubis

Return to bug 154641