Date: Sat, 22 Sep 2012 11:25:14 +0200 From: Thomas Steen Rasmussen <thomas@gibfest.dk> To: ports@freebsd.org Cc: bra@fsn.hu Subject: [PATCH] mail/dovecot2-pigeonhole segfault when validating sieve syntax Message-ID: <505D83FA.7090801@gibfest.dk>
next in thread | raw e-mail | index | archive | help
Hello, There is a known segfault in mail/dovecot2-pigeonhole released with Dovecot 2.1.8 which is what we have in ports at the moment. The segfault makes it very near impossible to edit sieve scripts with a managesieve client which does syntax validation (like the Thunderbird plugin does). The problem has been fixed in Dovecot 2.1.9 which is not yet in ports. However, if you are impatient to get this solved, you can drop the following patch in /usr/ports/mail/dovecot2-pigeonhole/files and rebuild dovecot2-pidgeonhole and restart dovecot, and the problem is gone (for me at least): ----------------------------------------------------------------------------- [tykling@mail /usr/ports/mail/dovecot2-pigeonhole]$ cat files/patch-segfault diff -r f7ea71241032 -r 6ceeb6421231 src/lib-sievestorage/sieve-storage-save.c --- src/lib-sievestorage/sieve-storage-save.c Sun Apr 22 11:30:28 2012 +0200 +++ src/lib-sievestorage/sieve-storage-save.c Thu Jul 12 23:57:50 2012 +0200 @@ -318,19 +318,20 @@ bool sieve_storage_save_will_activate (struct sieve_save_context *ctx) { - const char *scriptname; - int ret = 0; + bool result = FALSE; - T_BEGIN { + if ( ctx->scriptname != NULL ) T_BEGIN { + const char *scriptname; + int ret; + ret = sieve_storage_get_active_scriptfile(ctx->storage, &scriptname); - if ( ret > 0 ) { /* Is the requested script active? */ - ret = ( strcmp(ctx->scriptname, scriptname) == 0 ? 1 : 0 ); + result = ( strcmp(ctx->scriptname, scriptname) == 0 ); } } T_END; - return ret; + return result; } int sieve_storage_save_commit(struct sieve_save_context **ctx) -------------------------------------------------------------------------------- The patch is unchange from the upstream patch except for paths: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/6ceeb6421231/src/lib-sievestorage/sieve-storage-save.c I'd prepare a proper port patch but I expect Dovecot in ports to be updated to 2.1.9 soon-ish, so this is just a temporary solution :) Hope this can help someone, Best regards, Thomas Steen Rasmussen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?505D83FA.7090801>