Three fixes for Dovecot 1.0..
- Maildir: Group of the created shared directory wasn't set. - Logging: Make sure we don't recurse infinitely when running out of memory. - rfc822_parse_phrase(): Don't read outside data boundaries if input is empty. From the Dovecot Mercurial repo. ok sthen@
This commit is contained in:
parent
9fb5264391
commit
a21d22d462
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.100 2008/07/02 23:00:10 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.101 2008/07/21 09:33:18 brad Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -10,7 +10,7 @@ V_DOVECOT= 1.0.15
|
||||
V_SIEVE= 1.0.3
|
||||
|
||||
PKGNAME= dovecot-${V_DOVECOT}
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}p0
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}p1
|
||||
PKGNAME-sieve= dovecot-sieve-${V_SIEVE}
|
||||
|
||||
DISTNAME= dovecot-${V_DOVECOT}
|
||||
|
12
mail/dovecot/patches/patch-src_lib-mail_rfc822-parser_c
Normal file
12
mail/dovecot/patches/patch-src_lib-mail_rfc822-parser_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_lib-mail_rfc822-parser_c,v 1.1 2008/07/21 09:33:18 brad Exp $
|
||||
--- src/lib-mail/rfc822-parser.c.orig Mon Jul 21 01:54:49 2008
|
||||
+++ src/lib-mail/rfc822-parser.c Mon Jul 21 01:55:24 2008
|
||||
@@ -261,6 +261,8 @@ int rfc822_parse_phrase(struct rfc822_parser_context *
|
||||
obs-phrase = word *(word / "." / CFWS)
|
||||
*/
|
||||
|
||||
+ if (ctx->data == ctx->end)
|
||||
+ return 0;
|
||||
if (*ctx->data == '.')
|
||||
return -1;
|
||||
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-src_lib-storage_index_maildir_maildir-storage_c,v 1.5 2008/07/21 09:37:36 brad Exp $
|
||||
--- src/lib-storage/index/maildir/maildir-storage.c.orig Mon Jul 21 01:57:58 2008
|
||||
+++ src/lib-storage/index/maildir/maildir-storage.c Mon Jul 21 01:58:53 2008
|
||||
@@ -663,6 +663,10 @@ static int maildir_create_shared(struct index_storage
|
||||
umask(old_mask);
|
||||
return -1;
|
||||
}
|
||||
+ if (chown(dir, (uid_t)-1, gid) < 0) {
|
||||
+ mail_storage_set_critical(storage,
|
||||
+ "chown(%s) failed: %m", dir);
|
||||
+ }
|
||||
for (i = 0; i < N_MAILDIR_SUBDIRS; i++) {
|
||||
path = t_strconcat(dir, "/", maildir_subdirs[i], NULL);
|
||||
if (chown(path, (uid_t)-1, gid) < 0) {
|
27
mail/dovecot/patches/patch-src_lib_failures_c
Normal file
27
mail/dovecot/patches/patch-src_lib_failures_c
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-src_lib_failures_c,v 1.1 2008/07/21 09:37:36 brad Exp $
|
||||
--- src/lib/failures.c.orig Tue Dec 11 13:52:08 2007
|
||||
+++ src/lib/failures.c Mon Jul 21 02:03:52 2008
|
||||
@@ -376,9 +376,15 @@ void i_set_failure_file(const char *path, const char *
|
||||
|
||||
static int internal_handler(char log_type, const char *format, va_list args)
|
||||
{
|
||||
+ static int recursed = 0;
|
||||
string_t *str;
|
||||
int ret;
|
||||
|
||||
+ if (recursed != 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ recursed++;
|
||||
+
|
||||
t_push();
|
||||
str = t_str_new(512);
|
||||
str_append_c(str, 1);
|
||||
@@ -388,6 +394,7 @@ static int internal_handler(char log_type, const char
|
||||
ret = write_full(2, str_data(str), str_len(str));
|
||||
t_pop();
|
||||
|
||||
+ recursed--;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user