diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index f3dfa3e..63e8242 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -9,7 +9,7 @@ pkgname=dovecot pkgver=2.2.18 -pkgrel=1 +pkgrel=2 pkgdesc="An IMAP and POP3 server written with security primarily in mind" arch=('i686' 'x86_64') url="http://dovecot.org/" @@ -23,16 +23,20 @@ optdepends=('libldap: ldap plugin' provides=('imap-server' 'pop3-server') install=$pkgname.install source=(http://dovecot.org/releases/2.2/${pkgname}-${pkgver}.tar.gz{,.sig} - dovecot.tmpfilesd) + dovecot.tmpfilesd + fts-segfault-glibc-2-22.patch) md5sums=('1e42eb3b69544c447ad882d7858f3630' 'SKIP' - '342a28251d40f983c98c0d1f1bf3d07d') + '342a28251d40f983c98c0d1f1bf3d07d' + 'ce896189810b23c8a2793e50100d943b') validpgpkeys=('E643F0BDFDCD04D9FFCB6279C948525140558AC9') # Timo Sirainen prepare() { cd $pkgname-$pkgver # fix path in helper script sed -i 's:OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}:OPENSSLCONFIG=${OPENSSLCONFIG- /etc/ssl/dovecot-openssl.cnf}:' doc/mkcert.sh + + patch -p1 < "${srcdir}/fts-segfault-glibc-2-22.patch" } build() { diff --git a/trunk/fts-segfault-glibc-2-22.patch b/trunk/fts-segfault-glibc-2-22.patch index e69de29..9016af1 100644 --- a/trunk/fts-segfault-glibc-2-22.patch +++ b/trunk/fts-segfault-glibc-2-22.patch @@ -0,0 +1,43 @@ +diff -r 917d027836d0 src/lib-storage/mail-storage-service.c +--- a/src/lib-storage/mail-storage-service.c Fri May 15 14:02:58 2015 +0300 ++++ b/src/lib-storage/mail-storage-service.c Wed Aug 19 01:35:30 2015 -0500 +@@ -3,6 +3,7 @@ + #include "lib.h" + #include "ioloop.h" + #include "array.h" ++#include "base64.h" + #include "hostpid.h" + #include "module-dir.h" + #include "restrict-access.h" +@@ -1024,6 +1025,20 @@ + i_set_failure_prefix("%s", str_c(str)); + } + ++static const char *mail_storage_service_generate_session_id(pool_t pool) ++{ ++ guid_128_t guid; ++ string_t *str = str_new(pool, MAX_BASE64_ENCODED_SIZE(sizeof(guid))); ++ ++ guid_128_generate(guid); ++ base64_encode(guid, sizeof(guid), str); ++ /* remove the trailing "==" */ ++ i_assert(str_data(str)[str_len(str)-2] == '='); ++ str_truncate(str, str_len(str)-2); ++ return str_c(str); ++ ++} ++ + static int + mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx, + const struct mail_storage_service_input *input, +@@ -1123,6 +1138,10 @@ + user->input.userdb_fields = NULL; + user->input.username = p_strdup(user_pool, username); + user->input.session_id = p_strdup(user_pool, input->session_id); ++ if (user->input.session_id == NULL) { ++ user->input.session_id = ++ mail_storage_service_generate_session_id(user_pool); ++ } + user->user_info = user_info; + user->flags = flags; +