add two patches from upstream repo;
- maildir: Having a lot of keywords assert-crashed with "stack frame changed". - master: When creating login processes, don't close any fds after dup2()s. from Brad (maintainer).
This commit is contained in:
parent
1c4d6b6360
commit
8b569197c5
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.126 2009/10/30 11:43:48 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.127 2009/11/06 17:08:50 sthen Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -9,8 +9,8 @@ V_MAJOR= 1.1
|
||||
V_DOVECOT= 1.1.19
|
||||
V_SIEVE= 1.1.7
|
||||
|
||||
PKGNAME= dovecot-${V_DOVECOT}p0
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}p0
|
||||
PKGNAME= dovecot-${V_DOVECOT}p1
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}p1
|
||||
FULLPKGNAME-sieve= dovecot-sieve-${V_SIEVE}
|
||||
|
||||
DISTNAME= dovecot-${V_DOVECOT}
|
||||
|
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-src_lib-storage_index_maildir_maildir-sync-index_c,v 1.3 2009/11/06 17:08:50 sthen Exp $
|
||||
--- src/lib-storage/index/maildir/maildir-sync-index.c.orig Tue Nov 3 19:47:59 2009
|
||||
+++ src/lib-storage/index/maildir/maildir-sync-index.c Tue Nov 3 19:49:35 2009
|
||||
@@ -413,8 +413,8 @@ int maildir_sync_index(struct maildir_index_sync_conte
|
||||
|
||||
mbox->syncing_commit = TRUE;
|
||||
seq = prev_uid = 0; first_recent_uid = I_MAX(hdr->first_recent_uid, 1);
|
||||
- t_array_init(&ctx->keywords, MAILDIR_MAX_KEYWORDS);
|
||||
- t_array_init(&ctx->idx_keywords, MAILDIR_MAX_KEYWORDS);
|
||||
+ i_array_init(&ctx->keywords, MAILDIR_MAX_KEYWORDS);
|
||||
+ i_array_init(&ctx->idx_keywords, MAILDIR_MAX_KEYWORDS);
|
||||
iter = maildir_uidlist_iter_init(mbox->uidlist);
|
||||
while (maildir_uidlist_iter_next(iter, &uid, &uflags, &filename)) {
|
||||
maildir_filename_get_flags(ctx->keywords_sync_ctx, filename,
|
||||
@@ -586,6 +586,8 @@ int maildir_sync_index(struct maildir_index_sync_conte
|
||||
offsetof(struct mail_index_header, first_recent_uid),
|
||||
&first_recent_uid, sizeof(first_recent_uid), FALSE);
|
||||
}
|
||||
+ array_free(&ctx->keywords);
|
||||
+ array_free(&ctx->idx_keywords);
|
||||
return ret < 0 ? -1 : (full_rescan ? 0 : 1);
|
||||
}
|
||||
|
36
mail/dovecot/patches/patch-src_master_login-process_c
Normal file
36
mail/dovecot/patches/patch-src_master_login-process_c
Normal file
@ -0,0 +1,36 @@
|
||||
$OpenBSD: patch-src_master_login-process_c,v 1.1 2009/11/06 17:08:50 sthen Exp $
|
||||
--- src/master/login-process.c.orig Thu Nov 5 17:38:03 2009
|
||||
+++ src/master/login-process.c Thu Nov 5 17:40:21 2009
|
||||
@@ -618,6 +618,8 @@ static pid_t create_login_process(struct login_group *
|
||||
i_error("socketpair() failed: %m");
|
||||
return -1;
|
||||
}
|
||||
+ fd_close_on_exec(fd[0], TRUE);
|
||||
+ fd_close_on_exec(fd[1], TRUE);
|
||||
|
||||
max_log_lines_per_sec =
|
||||
group->set->login_process_per_connection ? 10 : 0;
|
||||
@@ -645,7 +647,6 @@ static pid_t create_login_process(struct login_group *
|
||||
log_set_pid(log, pid);
|
||||
|
||||
net_set_nonblock(fd[0], TRUE);
|
||||
- fd_close_on_exec(fd[0], TRUE);
|
||||
(void)login_process_new(group, pid, fd[0], FALSE);
|
||||
(void)close(fd[1]);
|
||||
(void)close(log_fd);
|
||||
@@ -685,13 +686,12 @@ static pid_t create_login_process(struct login_group *
|
||||
|
||||
if (dup2_array(&dups) < 0)
|
||||
i_fatal("Failed to dup2() fds");
|
||||
+ /* NOTE: don't close any fds below here. dup2_array() may have already
|
||||
+ assigned other fds to them. */
|
||||
|
||||
/* don't close any of these */
|
||||
for (tmp_fd = 0; tmp_fd < cur_fd; tmp_fd++)
|
||||
fd_close_on_exec(tmp_fd, FALSE);
|
||||
-
|
||||
- (void)close(fd[0]);
|
||||
- (void)close(fd[1]);
|
||||
|
||||
login_process_init_env(group, getpid());
|
||||
|
Loading…
x
Reference in New Issue
Block a user