summaryrefslogtreecommitdiff
path: root/mail/anubis/files
diff options
context:
space:
mode:
authorDennis Herrmann <dhn@FreeBSD.org>2011-02-14 21:38:40 +0000
committerDennis Herrmann <dhn@FreeBSD.org>2011-02-14 21:38:40 +0000
commit899eaa08bc042c56ebd56b2b235588976bde76ef (patch)
tree973e0cfe2fea80a547d38f38da40fcc55657b92d /mail/anubis/files
parent- Update to 0.85 (diff)
- Update to 4.1.1
- Pass maintainership to submitter - Remove MD5 checksum - Mark MAKE_JOBS_UNSAFE - Add LICENSE PR: ports/154641 Submitted by: Jason E. Hale <bsdkaffee@gmail.com>
Diffstat (limited to 'mail/anubis/files')
-rw-r--r--mail/anubis/files/anubis.in31
-rw-r--r--mail/anubis/files/anubis.sh15
-rw-r--r--mail/anubis/files/patch-config.h.in23
-rw-r--r--mail/anubis/files/patch-configure28
-rw-r--r--mail/anubis/files/patch-configure.ac92
-rw-r--r--mail/anubis/files/patch-src__env.c11
-rw-r--r--mail/anubis/files/patch-src__gpg.c11
-rw-r--r--mail/anubis/files/patch-src__headers.h27
-rw-r--r--mail/anubis/files/patch-src_auth.c114
-rw-r--r--mail/anubis/files/patch-src_errs.c14
-rw-r--r--mail/anubis/files/patch-src_log.c14
-rw-r--r--mail/anubis/files/patch-src_net.c22
-rw-r--r--mail/anubis/files/patch-src_ssl.c14
-rw-r--r--mail/anubis/files/patch-src_tunnel.c20
14 files changed, 195 insertions, 241 deletions
diff --git a/mail/anubis/files/anubis.in b/mail/anubis/files/anubis.in
new file mode 100644
index 000000000000..99b5e85f2429
--- /dev/null
+++ b/mail/anubis/files/anubis.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: anubis
+# REQUIRE: %%REQUIRE%%
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable anubis:
+#
+# anubis_enable (bool): Set to "YES" to enable anubis.
+# Default is "NO".
+# anubis_conf (file): Set location of anubisrc.
+# Default is "%%PREFIX%%/etc/anubisrc"
+#
+
+. /etc/rc.subr
+
+name="anubis"
+rcvar=`set_rcvar`
+
+load_rc_config ${name}
+
+: ${anubis_enable="NO"}
+: ${anubis_conf="%%PREFIX%%/etc/anubisrc"}
+
+required_files="${anubis_conf}"
+command="%%PREFIX%%/sbin/${name}"
+run_rc_command "$1"
diff --git a/mail/anubis/files/anubis.sh b/mail/anubis/files/anubis.sh
deleted file mode 100644
index 4404db4cf427..000000000000
--- a/mail/anubis/files/anubis.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-case "$1" in
-start)
- [ -x %%PREFIX%%/sbin/anubis ] && %%PREFIX%%/sbin/anubis > /dev/null && echo -n ' anubis'
- ;;
-stop)
- killall anubis
- ;;
-*)
- echo "Usage: `basename $0` {start|stop}" >&2
- ;;
-esac
-
-exit 0
diff --git a/mail/anubis/files/patch-config.h.in b/mail/anubis/files/patch-config.h.in
new file mode 100644
index 000000000000..246471ac1b43
--- /dev/null
+++ b/mail/anubis/files/patch-config.h.in
@@ -0,0 +1,23 @@
+--- ./config.h.in.orig 2008-12-19 13:30:37.000000000 -0500
++++ ./config.h.in 2011-02-09 20:52:34.000000000 -0500
+@@ -180,9 +180,6 @@
+ /* Define to 1 if you have the `pam' library (-lpam). */
+ #undef HAVE_LIBPAM
+
+-/* Define to 1 if you have the `pam_misc' library (-lpam_misc). */
+-#undef HAVE_LIBPAM_MISC
+-
+ /* Define to 1 if you have the `pcre' library (-lpcre). */
+ #undef HAVE_LIBPCRE
+
+@@ -252,8 +249,8 @@
+ /* Define to 1 if you have the <security/pam_appl.h> header file. */
+ #undef HAVE_SECURITY_PAM_APPL_H
+
+-/* Define to 1 if you have the <security/pam_misc.h> header file. */
+-#undef HAVE_SECURITY_PAM_MISC_H
++/* Define to 1 if you have the <security/openpam.h> header file. */
++#undef HAVE_SECURITY_OPENPAM_H
+
+ /* Define to 1 if you have the `setegid' function. */
+ #undef HAVE_SETEGID
diff --git a/mail/anubis/files/patch-configure b/mail/anubis/files/patch-configure
deleted file mode 100644
index 641761441f7b..000000000000
--- a/mail/anubis/files/patch-configure
+++ /dev/null
@@ -1,28 +0,0 @@
---- configure.orig Mon Dec 20 20:32:43 2004
-+++ configure Mon Dec 20 20:34:13 2004
-@@ -8603,13 +8603,13 @@
-
- else
-
--echo "$as_me:$LINENO: checking for main in -lgpgme" >&5
--echo $ECHO_N "checking for main in -lgpgme... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for main in -lgpgme03" >&5
-+echo $ECHO_N "checking for main in -lgpgme03... $ECHO_C" >&6
- if test "${ac_cv_lib_gpgme_main+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lgpgme $LIBS"
-+LIBS="-lgpgme03 $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
- /* confdefs.h. */
-@@ -8656,7 +8656,7 @@
- #define HAVE_LIBGPGME 1
- _ACEOF
-
-- LIBS="-lgpgme $LIBS"
-+ LIBS="-lgpgme03 $LIBS"
-
- else
- with_gpgme=no
diff --git a/mail/anubis/files/patch-configure.ac b/mail/anubis/files/patch-configure.ac
new file mode 100644
index 000000000000..0c40e5fe4e4d
--- /dev/null
+++ b/mail/anubis/files/patch-configure.ac
@@ -0,0 +1,92 @@
+--- ./configure.ac.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./configure.ac 2011-02-09 20:52:34.000000000 -0500
+@@ -77,7 +77,6 @@
+ ])
+
+ AC_CHECK_LIB(socket, socket)
+-AC_CHECK_LIB(nsl, gethostbyaddr)
+
+ AC_SUBST(INCLUDES)
+ case $build in
+@@ -143,10 +142,10 @@
+ else
+ AC_PATH_PROG(GPG, gpg)
+ findgpgmedir() { :
+- if test -f "$1/include/gpgme.h"; then
++ if test -f "$1/include/gpgme/gpgme.h"; then
+ gpgmedir=1
+ INCLUDES="$INCLUDES -I$1/include"
+- AC_MSG_CHECKING(for $1/include/gpgme.h)
++ AC_MSG_CHECKING(for $1/include/gpgme/gpgme.h)
+ AC_MSG_RESULT([yes])
+ return 0
+ fi
+@@ -158,7 +157,7 @@
+ if test $gpgmedir; then
+ AC_DEFINE(HAVE_GPGME_H, 1, [Define to 1 if HAVE_GPGME_H is requested.])
+ else
+- AC_CHECK_HEADERS(gpgme.h)
++ AC_CHECK_HEADERS(gpgme/gpgme.h)
+ fi
+ ANUBIS_GPGFILES='$(GPGFILES)'
+ M4_DEFS="$M4_DEFS -DWITH_GPG"
+@@ -189,6 +188,7 @@
+ WITH_MYSQL=no
+ WITH_POSTGRES=no
+ WITH_GDBM=no
++WITH_GSASL=no
+
+ dnl Use option --with-gsasl to compile GSASL library support.
+ MU_CHECK_GSASL(0.2.3, [
+@@ -199,11 +199,21 @@
+ ANUBIS_BIN_ADM='$(adm_bin_programs)'
+ M4_DEFS="$M4_DEFS -DWITH_GSASL"
+
++ AC_ARG_WITH(gdbm,
++ AC_HELP_STRING([--with-gdbm],
++ [Configure to work with GDBM]),
++ [with_gdbm=${withval}],
++ [with_gdbm=no])
++ if test "$with_gdbm" = "yes"; then
+ AC_CHECK_LIB(gdbm, gdbm_open,
+ [WITH_GDBM=yes
+ LIBS="$LIBS -lgdbm"
+ AC_DEFINE(HAVE_LIBGDBM,1,[Define if you have libgdbm])],
+- [AC_MSG_RESULT([Disabling GDBM support...])])
++ with_gdbm=no)
++ fi
++ if test "$with_gdbm" = "yes"; then
++ AC_MSG_RESULT([Enabling GDBM support...])
++ fi
+
+ AC_ARG_WITH(mysql,
+ AC_HELP_STRING([--with-mysql],
+@@ -277,7 +287,8 @@
+ if test $with_gnutls = yes; then
+ AC_CHECK_HEADERS(gnutls/gnutls.h)
+ if test $ac_cv_header_gnutls_gnutls_h != no; then
+- AM_PATH_LIBGNUTLS("1.0.0",
++ PKG_CHECK_MODULES([LIBGNUTLS],
++ [gnutls >= 1.0.0],
+ [M4_DEFS="$M4_DEFS -DWITH_SSL -DWITH_GNUTLS"
+ AC_DEFINE(USE_GNUTLS, 1,
+ [Define to 1 if USE_GNUTLS is requested.])],
+@@ -327,8 +338,8 @@
+ [with_pam=no])
+ if test "$with_pam" = "yes"; then
+ AC_CHECK_LIB(pam, main,, with_pam=no)
+- AC_CHECK_LIB(pam_misc, main,, with_pam=no)
+- AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h,, with_pam=no)
++ AC_CHECK_HEADER(security/pam_appl.h,, with_pam=no)
++ AC_CHECK_HEADER(security/openpam.h,, with_pam=no, [ #include <security/pam_appl.h> ])
+ fi
+ if test "$with_pam" = "yes"; then
+ AC_MSG_RESULT([Enabling PAM support...])
+@@ -342,7 +353,6 @@
+ [with_tcp_wrappers=no])
+ if test "$with_tcp_wrappers" = "yes"; then
+ AC_CHECK_LIB(wrap, main,, with_tcp_wrappers=no)
+- AC_CHECK_LIB(nsl, main,, with_tcp_wrappers=no)
+ AC_CHECK_HEADERS(tcpd.h,, with_tcp_wrappers=no)
+ fi
+ if test "$with_tcp_wrappers" = "yes"; then
diff --git a/mail/anubis/files/patch-src__env.c b/mail/anubis/files/patch-src__env.c
new file mode 100644
index 000000000000..db2608efdf04
--- /dev/null
+++ b/mail/anubis/files/patch-src__env.c
@@ -0,0 +1,11 @@
+--- ./src/env.c.orig 2008-12-16 16:44:38.000000000 -0500
++++ ./src/env.c 2011-02-09 20:52:34.000000000 -0500
+@@ -32,7 +32,7 @@
+ #ifdef HAVE_PAM
+ pam_handle_t *pamh;
+ static struct pam_conv conv = {
+- misc_conv,
++ openpam_ttyconv,
+ NULL
+ };
+ #endif /* HAVE_PAM */
diff --git a/mail/anubis/files/patch-src__gpg.c b/mail/anubis/files/patch-src__gpg.c
new file mode 100644
index 000000000000..0e8cfd792e21
--- /dev/null
+++ b/mail/anubis/files/patch-src__gpg.c
@@ -0,0 +1,11 @@
+--- ./src/gpg.c.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./src/gpg.c 2011-02-09 20:52:34.000000000 -0500
+@@ -23,7 +23,7 @@
+ #include "rcfile.h"
+
+ #ifdef HAVE_GPG
+-#include <gpgme.h>
++#include <gpgme/gpgme.h>
+ #define obstack_chunk_alloc malloc
+ #define obstack_chunk_free free
+ #include <obstack.h>
diff --git a/mail/anubis/files/patch-src__headers.h b/mail/anubis/files/patch-src__headers.h
new file mode 100644
index 000000000000..3e835d0ce897
--- /dev/null
+++ b/mail/anubis/files/patch-src__headers.h
@@ -0,0 +1,27 @@
+--- ./src/headers.h.orig 2008-12-16 11:21:54.000000000 -0500
++++ ./src/headers.h 2011-02-09 20:52:34.000000000 -0500
+@@ -51,11 +51,11 @@
+ # else
+ # error POSIX Regular Expressions are required!
+ # endif /* HAVE_REGEX_H and HAVE_REGCOMP */
+-# if defined(HAVE_LIBPAM) && defined(HAVE_LIBPAM_MISC)
+-# if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_PAM_MISC_H)
++# if defined(HAVE_LIBPAM)
++# if defined(HAVE_SECURITY_PAM_APPL_H) && defined(HAVE_SECURITY_OPENPAM_H)
+ # define HAVE_PAM
+-# endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_PAM_MISC_H */
+-# endif /* HAVE_LIBPAM and HAVE_LIBPAM_MISC */
++# endif /* HAVE_SECURITY_PAM_APPL_H and HAVE_SECURITY_OPENPAM_H */
++# endif /* HAVE_LIBPAM */
+ # if defined(HAVE_LIBWRAP) && defined(HAVE_TCPD_H)
+ # define USE_LIBWRAP
+ # endif /* HAVE_LIBWRAP and HAVE_TCPD_H */
+@@ -121,7 +121,7 @@
+
+ #ifdef HAVE_PAM
+ # include <security/pam_appl.h>
+-# include <security/pam_misc.h>
++# include <security/openpam.h>
+ #endif /* HAVE_PAM */
+
+ #if defined(WITH_GSASL)
diff --git a/mail/anubis/files/patch-src_auth.c b/mail/anubis/files/patch-src_auth.c
deleted file mode 100644
index f4e4209b1c52..000000000000
--- a/mail/anubis/files/patch-src_auth.c
+++ /dev/null
@@ -1,114 +0,0 @@
-
-$FreeBSD$
-
---- src/auth.c.orig Wed Dec 4 22:43:34 2002
-+++ src/auth.c Sun Mar 7 15:10:48 2004
-@@ -42,6 +42,66 @@
- IDENT protocol support
- ************************/
-
-+#define USERNAME_C "USERID :"
-+
-+/* If the reply matches sscanf expression
-+
-+ "%*[^:]: USERID :%*[^:]:%s"
-+
-+ and the length of "%s" part does not exceed size-1 bytes,
-+ copies this part to USERNAME and returns 0. Otherwise,
-+ returns 1 */
-+
-+static int
-+ident_extract_username(char *reply, char *username, size_t size)
-+{
-+ char *p;
-+
-+ p = strchr (reply, ':');
-+ if (!p)
-+ return 1;
-+ if (p[1] != ' '
-+ || strncmp (p + 2, USERNAME_C, sizeof (USERNAME_C) - 1))
-+ return 1;
-+ p += 2 + sizeof (USERNAME_C) - 1;
-+ p = strchr (p, ':');
-+ if (!p)
-+ return 1;
-+ p++;
-+ if (strlen (p) >= size)
-+ return 1;
-+ strcpy(username, p);
-+ return 0;
-+}
-+
-+/* If the reply matches sscanf expression
-+
-+ "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s"
-+
-+ and the length of "%s" part does not exceed size-1 bytes,
-+ copies this part to USERNAME and returns 0. Otherwise,
-+ returns 1 */
-+
-+static int
-+crypt_extract_username(char *reply, char *username, size_t size)
-+{
-+ int i;
-+ char *p = reply;
-+#define skip_word(c) while (*c && (*c) != ' ') c++
-+
-+ /* Skip five words */
-+ for (i = 0; i < 5; i++) {
-+ skip_word(p);
-+ if (!*p++)
-+ return 1;
-+ }
-+
-+ if (strlen (p) >= size)
-+ return 1;
-+ strcpy(username, p);
-+ return 0;
-+}
-+
- int
- auth_ident(struct sockaddr_in *addr, char *user, int size)
- {
-@@ -51,7 +111,8 @@
- int sd = 0;
-
- if ((sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-- anubis_error(SOFT, _("IDENT: socket() failed: %s."), strerror(errno));
-+ anubis_error(SOFT, _("IDENT: socket() failed: %s."),
-+ strerror(errno));
- return 0;
- }
- memcpy(&ident, addr, sizeof(ident));
-@@ -69,11 +130,7 @@
- info(VERBOSE, _("IDENT: connected to %s:%u"),
- inet_ntoa(ident.sin_addr), ntohs(ident.sin_port));
-
-- #ifdef HAVE_SNPRINTF
- snprintf(buf, LINEBUFFER,
-- #else
-- sprintf(buf,
-- #endif /* HAVE_SNPRINTF */
- "%u , %u"CRLF, ntohs(addr->sin_port), session.tunnel_port);
-
- if (send(sd, buf, strlen(buf), 0) == -1) {
-@@ -89,7 +146,8 @@
- close_socket(sd);
- memset(user, 0, size);
-
-- if (sscanf(buf, "%*[^:]: USERID :%*[^:]:%s", user) != 1) {
-+ remcrlf (buf);
-+ if (ident_extract_username(buf, user, size)) {
- info(VERBOSE, _("IDENT: incorrect data."));
- return 0;
- }
-@@ -105,7 +163,8 @@
- if (rs == -1)
- return 0;
-
-- if (sscanf(buf, "%*[^ ] %*[^ ] %*[^ ] %*[^ ] %*[^ ] %s", user) != 1) {
-+ remcrlf (buf);
-+ if (crypt_extract_username(buf, user, size)) {
- info(VERBOSE, _("IDENT: incorrect data (DES deciphered)."));
- return 0;
- }
diff --git a/mail/anubis/files/patch-src_errs.c b/mail/anubis/files/patch-src_errs.c
deleted file mode 100644
index 5fc5f5ab0485..000000000000
--- a/mail/anubis/files/patch-src_errs.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/errs.c.orig Wed Dec 4 22:42:02 2002
-+++ src/errs.c Sun Mar 7 15:10:48 2004
-@@ -51,7 +51,7 @@
- if (options.slogfile)
- filelog(options.slogfile, txt);
- else
-- syslog(LOG_ERR | LOG_MAIL, txt);
-+ syslog(LOG_ERR | LOG_MAIL, "%s", txt);
-
- if (options.ulogfile && options.uloglevel >= FAILS)
- filelog(options.ulogfile, txt);
diff --git a/mail/anubis/files/patch-src_log.c b/mail/anubis/files/patch-src_log.c
deleted file mode 100644
index 6ec3bdd268be..000000000000
--- a/mail/anubis/files/patch-src_log.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/log.c.orig Wed Dec 4 22:42:26 2002
-+++ src/log.c Sun Mar 7 15:10:48 2004
-@@ -70,7 +70,7 @@
- if (options.slogfile)
- filelog(options.slogfile, txt);
- else
-- syslog(LOG_INFO | LOG_MAIL, txt);
-+ syslog(LOG_INFO | LOG_MAIL, "%s", txt);
-
- if (options.ulogfile && options.uloglevel >= ALL)
- filelog(options.ulogfile, txt);
diff --git a/mail/anubis/files/patch-src_net.c b/mail/anubis/files/patch-src_net.c
deleted file mode 100644
index 9fbbfea08c9a..000000000000
--- a/mail/anubis/files/patch-src_net.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-$FreeBSD$
-
---- src/net.c.orig Wed Dec 11 15:37:56 2002
-+++ src/net.c Sun Mar 7 14:55:10 2004
-@@ -122,6 +122,7 @@
- int sd = 0;
- unsigned long inaddr;
- struct sockaddr_in addr;
-+ int true = 1;
-
- memset(&addr, 0, sizeof(addr));
- addr.sin_family = AF_INET;
-@@ -152,6 +153,8 @@
- }
- else
- addr.sin_addr.s_addr = htonl(INADDR_ANY);
-+
-+ setsockopt (sd, SOL_SOCKET, SO_REUSEADDR, &true, sizeof(true));
-
- if (bind(sd, (struct sockaddr *)&addr, sizeof(addr)))
- anubis_error(HARD, _("bind() failed: %s."), strerror(errno));
diff --git a/mail/anubis/files/patch-src_ssl.c b/mail/anubis/files/patch-src_ssl.c
deleted file mode 100644
index 6e91d35a01ae..000000000000
--- a/mail/anubis/files/patch-src_ssl.c
+++ /dev/null
@@ -1,14 +0,0 @@
-
-$FreeBSD$
-
---- src/ssl.c.orig Wed Dec 4 22:40:45 2002
-+++ src/ssl.c Sun Mar 7 15:10:48 2004
-@@ -64,7 +64,7 @@
- if (options.termlevel != SILENT) {
- #ifdef HAVE_SYSLOG
- if ((topt & T_DAEMON) && !(topt & T_FOREGROUND))
-- syslog(LOG_ERR | LOG_MAIL, string_error);
-+ syslog(LOG_ERR | LOG_MAIL, "%s", string_error);
- else
- #endif /* HAVE_SYSLOG */
- mprintf(">>%s", string_error);
diff --git a/mail/anubis/files/patch-src_tunnel.c b/mail/anubis/files/patch-src_tunnel.c
deleted file mode 100644
index 76b4f17d31f2..000000000000
--- a/mail/anubis/files/patch-src_tunnel.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-$FreeBSD$
-
---- src/tunnel.c.orig Sun Dec 8 19:04:51 2002
-+++ src/tunnel.c Sun Mar 7 14:55:10 2004
-@@ -554,9 +554,11 @@
- ptr1 = strstr(boundary_buf, "boundary=");
- if (ptr1 == 0) {
- plist = plist->next;
-- safe_strcpy(boundary_buf, plist->line);
-- change_to_lower(boundary_buf);
-- ptr1 = strstr(boundary_buf, "boundary=");
-+ if (plist) {
-+ safe_strcpy(boundary_buf, plist->line);
-+ change_to_lower(boundary_buf);
-+ ptr1 = strstr(boundary_buf, "boundary=");
-+ }
- }
-
- if (ptr1) {