diff -Nru dovecot-2.2.25/debian/changelog dovecot-2.2.25/debian/changelog --- dovecot-2.2.25/debian/changelog 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/changelog 2016-10-26 14:57:21.000000000 +0200 @@ -1,3 +1,9 @@ +dovecot (1:2.2.25-2) unstable; urgency=medium + + * Drop outdated and disfunctional drac plugin (Closes: #842153) + + -- Christian Ehrhardt Wed, 26 Oct 2016 14:56:18 +0200 + dovecot (1:2.2.25-1) unstable; urgency=medium * [cc29a81] Imported Upstream version 2.2.25 diff -Nru dovecot-2.2.25/debian/control dovecot-2.2.25/debian/control --- dovecot-2.2.25/debian/control 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/control 2016-10-26 14:59:50.000000000 +0200 @@ -15,7 +15,6 @@ libsasl2-dev, zlib1g-dev, krb5-multidev, - drac-dev (>= 1.12-5), libbz2-dev, libdb-dev, libcurl4-gnutls-dev, diff -Nru dovecot-2.2.25/debian/dovecot-core.install dovecot-2.2.25/debian/dovecot-core.install --- dovecot-2.2.25/debian/dovecot-core.install 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/dovecot-core.install 2016-10-26 14:59:58.000000000 +0200 @@ -1,5 +1,4 @@ #!/usr/bin/dh-exec -src/plugins/drac/drac_plugin.so usr/lib/dovecot/modules doc/example-config/*.conf* usr/share/dovecot doc/example-config/conf.d/*.conf* usr/share/dovecot/conf.d debian/maildirmake.dovecot usr/bin diff -Nru dovecot-2.2.25/debian/dovecot-core.lintian-overrides dovecot-2.2.25/debian/dovecot-core.lintian-overrides --- dovecot-2.2.25/debian/dovecot-core.lintian-overrides 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/dovecot-core.lintian-overrides 2016-10-26 15:00:01.000000000 +0200 @@ -7,7 +7,6 @@ dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/libdovecot-login.so.0.0.0 dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/libdovecot-sql.so.0.0.0 dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/auth/libauthdb_imap.so -dovecot-core: hardening-no-relro usr/lib/dovecot/modules/drac.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib05_pop3_migration_plugin.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib10_quota_plugin.so dovecot-core: hardening-no-fortify-functions usr/lib/dovecot/modules/lib11_trash_plugin.so diff -Nru dovecot-2.2.25/debian/patches/dovecot-drac.patch dovecot-2.2.25/debian/patches/dovecot-drac.patch --- dovecot-2.2.25/debian/patches/dovecot-drac.patch 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/patches/dovecot-drac.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,138 +0,0 @@ -Description: Adds support for drac -Origin: http://sourceforge.jp/projects/dovecot2-drac/releases/53176 -Author: Timo Sirainen - ---- /dev/null -+++ b/src/plugins/drac/Makefile -@@ -0,0 +1,20 @@ -+DOVDIR:=../../.. -+LIBS:=-ldrac -+ -+local_CFLAGS=-Wall -W -shared -fPIC -DHAVE_CONFIG_H -+INC=-I$(DOVDIR) \ -+ -I$(DOVDIR)/src/lib \ -+ -I$(DOVDIR)/src/lib-index \ -+ -I$(DOVDIR)/src/lib-mail \ -+ -I$(DOVDIR)/src/lib-storage \ -+ -I$(DOVDIR)/src/lib-storage/index \ -+ -I$(DOVDIR)/src/lib-storage/index/maildir \ -+ -I../../lib -+ -+all: drac_plugin.so -+ -+drac_plugin.so: drac-plugin.c -+ $(CC) $(CFLAGS) $(local_CFLAGS) $(INC) $(LDFLAGS) $< -o $@ $(LIBS) -+ -+clean: -+ @rm -f *.so *.o ---- /dev/null -+++ b/src/plugins/drac/drac-plugin.c -@@ -0,0 +1,108 @@ -+/* -+ * -+ * dovecot plugin for DRAC authentication -+ * -+ * Copyright (C) 2011 DesigNET, INC. -+ * -+ * $Id: drac-plugin.c,v 1.1.1.1 2011/09/09 08:04:34 usuda Exp $ -+ * -+ * based: -+ * http://dovecot.org/patches/1.1/drac.c -+ */ -+#include "lib.h" -+#include "net.h" -+#include "ioloop.h" -+#include "mail-user.h" -+#include "mail-storage-private.h" -+#include -+#include -+ -+/* default parameters */ -+#define DRAC_TIMEOUT_SECS (60) -+#define DRAC_HOST "localhost" -+ -+ -+/* libdrac function */ -+int dracauth(char *, unsigned long, char **); -+ -+const char *drac_plugin_version = DOVECOT_VERSION; -+ -+static struct timeout *to_drac = NULL; -+static const char *drachost = NULL; /* dracd host */ -+static unsigned long in_ip = 0; /* remote ip address */ -+static unsigned long dractout = 0; /* drac timeout secs */ -+ -+static void drac_timeout(void *context ATTR_UNUSED) -+{ -+ char *err; -+ -+ if(dracauth((char *)drachost, in_ip, &err) != 0) { -+ i_error("%s: dracauth() failed: %s", __FUNCTION__, err); -+ } -+} -+ -+static void drac_mail_user_created(struct mail_user *user) -+{ -+ const char *dractout_str; -+ char addrname[256]; -+ char *ep; -+ -+ /* check address family */ -+ if(user->remote_ip->family != AF_INET) { -+ if(inet_ntop(user->remote_ip->family, &user->remote_ip->u, -+ addrname, sizeof(addrname)-1) == NULL) { -+ strcpy(addrname, ""); -+ } -+ i_error("%s: Only IPv4 addresses are supported (%s)", __FUNCTION__, -+ addrname); -+ } else { -+ /* get remote IPv4 address... uum... */ -+ memcpy(&in_ip, &user->remote_ip->u, sizeof(in_ip)); -+ -+ /* get DRAC server name */ -+ drachost = mail_user_plugin_getenv(user, "dracdserver"); -+ if(drachost == NULL) { -+ drachost = DRAC_HOST; -+ } -+ -+ /* get timeout secs */ -+ dractout_str = mail_user_plugin_getenv(user, "dracdtimeout"); -+ if(dractout_str == NULL) { -+ dractout = DRAC_TIMEOUT_SECS; -+ } else { -+ dractout = strtoul(dractout_str, &ep, 10); -+ /* bad format -> use default value */ -+ if(ep != NULL && *ep != '\0') { -+ i_warning("%s: bad dracdtimeout (%s). using default %d", -+ __FUNCTION__, dractout_str, DRAC_TIMEOUT_SECS); -+ dractout = DRAC_TIMEOUT_SECS; -+ } -+ } -+ i_debug("%s: dracdserver=%s, timeout=%ldsecs", __FUNCTION__, -+ drachost, dractout); -+ -+ /* connect to DRAC server */ -+ drac_timeout(NULL); -+ to_drac = timeout_add(1000*dractout, drac_timeout, NULL); -+ } -+} -+ -+static struct mail_storage_hooks drac_mail_storage_hooks = { -+ .mail_user_created = drac_mail_user_created, -+}; -+ -+void drac_plugin_init(struct module *module) -+{ -+ mail_storage_hooks_add(module, &drac_mail_storage_hooks); -+ i_debug("%s called", __FUNCTION__); -+} -+ -+void drac_plugin_deinit(void) -+{ -+ if(to_drac != NULL) { -+ timeout_remove(&to_drac); -+ to_drac = NULL; -+ } -+ mail_storage_hooks_remove(&drac_mail_storage_hooks); -+ i_debug("%s called", __FUNCTION__); -+} diff -Nru dovecot-2.2.25/debian/patches/series dovecot-2.2.25/debian/patches/series --- dovecot-2.2.25/debian/patches/series 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/patches/series 2016-10-26 14:58:30.000000000 +0200 @@ -1,5 +1,4 @@ pigeonhole.patch -dovecot-drac.patch split-protocols.patch fix-mail_plugin_dir-default.patch ssl-cert-location.patch diff -Nru dovecot-2.2.25/debian/rules dovecot-2.2.25/debian/rules --- dovecot-2.2.25/debian/rules 2016-07-05 04:46:50.000000000 +0200 +++ dovecot-2.2.25/debian/rules 2016-10-26 15:00:28.000000000 +0200 @@ -6,8 +6,6 @@ PIGEONHOLE_DIR=$(CURDIR)/pigeonhole export DEB_BUILD_MAINT_OPTIONS=hardening=+all -# DRAC doesn't build with -fPIE -drac_buildflags = DEB_BUILD_MAINT_OPTIONS="hardening=+all,-pie" dpkg-buildflags # Macros to help move files to the module packages CORE_DIR=$(CURDIR)/debian/dovecot-core @@ -107,12 +105,10 @@ override_dh_auto_build: dh_auto_build --parallel dh_auto_build --parallel -D $(PIGEONHOLE_DIR) - $(MAKE) -C src/plugins/drac $(shell $(drac_buildflags) --export=configure) override_dh_auto_clean: dh_auto_clean dh_auto_clean -D $(PIGEONHOLE_DIR) - rm -f src/plugins/drac/drac_plugin.so override_dh_auto_install: # Install everything under dovecot-core