Maintenance update, recent patches are now rolled into the
distfile from upstream. From Brad.
This commit is contained in:
parent
fdf610d6d7
commit
c9ed1ad607
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.96 2008/05/30 23:25:09 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.97 2008/06/03 00:16:51 sthen Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,11 +6,11 @@ COMMENT-server= compact IMAP/POP3 server
|
||||
COMMENT-sieve= sieve mail filtering for Dovecot
|
||||
|
||||
V_MAJOR= 1.0
|
||||
V_DOVECOT= 1.0.13
|
||||
V_DOVECOT= 1.0.14
|
||||
V_SIEVE= 1.0.3
|
||||
|
||||
PKGNAME= dovecot-${V_DOVECOT}
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}p3
|
||||
PKGNAME-server= dovecot-${V_DOVECOT}
|
||||
PKGNAME-sieve= dovecot-sieve-${V_SIEVE}
|
||||
|
||||
DISTNAME= dovecot-${V_DOVECOT}
|
||||
|
@ -1,10 +1,10 @@
|
||||
MD5 (dovecot-1.0.13.tar.gz) = KBvZ3ujWwWdJdyV6zIDOZA==
|
||||
MD5 (dovecot-1.0.14.tar.gz) = ieKVgy3VxLqT1oRU50164w==
|
||||
MD5 (dovecot-sieve-1.0.3.tar.gz) = y+Q2GJn/tNnLYhUctEQntg==
|
||||
RMD160 (dovecot-1.0.13.tar.gz) = G6LGsU5BybxNNsEuqQoPrQJECds=
|
||||
RMD160 (dovecot-1.0.14.tar.gz) = EZ7bwY2BvkbWkB0qWztQtwiYDGQ=
|
||||
RMD160 (dovecot-sieve-1.0.3.tar.gz) = tXWhGB+yOJpH20zdKBWkei/jC5E=
|
||||
SHA1 (dovecot-1.0.13.tar.gz) = hpCyfQHopo7e9e0WJoHHn0B0ycE=
|
||||
SHA1 (dovecot-1.0.14.tar.gz) = 585jlyDDn1eMjcxBvYdSELjHbNg=
|
||||
SHA1 (dovecot-sieve-1.0.3.tar.gz) = SPZ8M8CGicUKJUvG+u7LpAfRIpQ=
|
||||
SHA256 (dovecot-1.0.13.tar.gz) = FtopsrwI0BeKCTI78Hh6Kg6VMHVlVWantLaxSMh6wl8=
|
||||
SHA256 (dovecot-1.0.14.tar.gz) = lNVTTX2Tgmix5CUWF/t1vmiE1kVXtzZz/H0YCVFNrcU=
|
||||
SHA256 (dovecot-sieve-1.0.3.tar.gz) = P54jq8ZOeucDQxRLmiD42lCqEC49m4V3Td2KwNFID+E=
|
||||
SIZE (dovecot-1.0.13.tar.gz) = 1774025
|
||||
SIZE (dovecot-1.0.14.tar.gz) = 1781681
|
||||
SIZE (dovecot-sieve-1.0.3.tar.gz) = 455806
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.16 2007/09/08 08:44:39 jakob Exp $
|
||||
--- Makefile.in.orig Sat Sep 8 02:30:09 2007
|
||||
+++ Makefile.in Sat Sep 8 09:18:15 2007
|
||||
@@ -652,7 +652,7 @@ install-data: install-data-recursive
|
||||
$OpenBSD: patch-Makefile_in,v 1.17 2008/06/03 00:16:51 sthen Exp $
|
||||
--- Makefile.in.orig Mon Jun 2 16:31:13 2008
|
||||
+++ Makefile.in Mon Jun 2 16:52:44 2008
|
||||
@@ -654,7 +654,7 @@ install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-dovecot-example_conf,v 1.40 2008/05/28 23:08:03 sthen Exp $
|
||||
--- dovecot-example.conf.orig Tue Mar 4 00:48:12 2008
|
||||
+++ dovecot-example.conf Tue May 27 19:46:09 2008
|
||||
$OpenBSD: patch-dovecot-example_conf,v 1.41 2008/06/03 00:16:51 sthen Exp $
|
||||
--- dovecot-example.conf.orig Tue May 27 07:48:26 2008
|
||||
+++ dovecot-example.conf Mon Jun 2 16:52:45 2008
|
||||
@@ -10,13 +10,12 @@
|
||||
# value inside quotes, eg.: key = "# char and trailing whitespace "
|
||||
|
||||
@ -55,15 +55,6 @@ $OpenBSD: patch-dovecot-example_conf,v 1.40 2008/05/28 23:08:03 sthen Exp $
|
||||
|
||||
# Set max. process size in megabytes. If you don't use
|
||||
# login_process_per_connection you might need to grow this.
|
||||
@@ -253,7 +252,7 @@
|
||||
#}
|
||||
|
||||
# Group to enable temporarily for privileged operations. Currently this is
|
||||
-# used only for creating mbox dotlock files when creation fails for INBOX.
|
||||
+# used only with INBOX when either its initial creation or dotlocking fails.
|
||||
# Typically this is set to "mail" to give access to /var/mail.
|
||||
#mail_privileged_group =
|
||||
|
||||
@@ -293,7 +292,7 @@
|
||||
|
||||
# Don't write() to mmaped files. This is required for some operating systems
|
||||
|
@ -1,42 +0,0 @@
|
||||
$OpenBSD: patch-src_auth_auth-request_c,v 1.1 2008/05/16 05:45:26 bernd Exp $
|
||||
|
||||
"allow_nets didn't work correctly with big endian machines."
|
||||
|
||||
From upstream:
|
||||
http://hg.dovecot.org/dovecot-1.0/rev/71c02fdf1b59
|
||||
|
||||
--- src/auth/auth-request.c.orig Thu May 15 01:43:22 2008
|
||||
+++ src/auth/auth-request.c Thu May 15 01:45:49 2008
|
||||
@@ -825,7 +825,7 @@ static int is_ip_in_network(const char *network, const
|
||||
struct ip_addr src_ip, net_ip;
|
||||
const char *p;
|
||||
unsigned int max_bits, bits, pos, i;
|
||||
- uint32_t mask;
|
||||
+ uint32_t mask, i1, i2;
|
||||
|
||||
if (net_ipv6_mapped_ipv4_convert(ip, &src_ip) == 0)
|
||||
ip = &src_ip;
|
||||
@@ -860,17 +860,19 @@ static int is_ip_in_network(const char *network, const
|
||||
if (ip1[i] != ip2[i])
|
||||
return 0;
|
||||
}
|
||||
+ i1 = htonl(ip1[i]);
|
||||
+ i2 = htonl(ip2[i]);
|
||||
|
||||
/* check the last full bytes */
|
||||
- for (mask = 0xff; pos + 8 <= bits; pos += 8, mask <<= 8) {
|
||||
- if ((ip1[i] & mask) != (ip2[i] & mask))
|
||||
+ for (mask = 0xff000000; pos + 8 <= bits; pos += 8, mask >>= 8) {
|
||||
+ if ((i1 & mask) != (i2 & mask))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check the last bits, they're reversed in bytes */
|
||||
bits -= pos;
|
||||
- for (mask = 0x80 << (pos % 32); bits > 0; bits--, mask >>= 1) {
|
||||
- if ((ip1[i] & mask) != (ip2[i] & mask))
|
||||
+ for (mask = 0x80000000 >> (pos % 32); bits > 0; bits--, mask >>= 1) {
|
||||
+ if ((i1 & mask) != (i2 & mask))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-src_imap-login_imap-proxy_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/imap-login/imap-proxy.c.orig Sun May 18 22:39:34 2008
|
||||
+++ src/imap-login/imap-proxy.c Sun May 18 22:40:30 2008
|
||||
@@ -45,9 +45,12 @@ static int proxy_input_line(struct imap_client *client
|
||||
return 0;
|
||||
} else if (strncmp(line, "P OK ", 5) == 0) {
|
||||
/* Login successful. Send this line to client. */
|
||||
- (void)o_stream_send_str(client->output, client->cmd_tag);
|
||||
- (void)o_stream_send_str(client->output, line + 1);
|
||||
- (void)o_stream_send(client->output, "\r\n", 2);
|
||||
+ str = t_str_new(128);
|
||||
+ str_append(str, client->cmd_tag);
|
||||
+ str_append(str, line + 1);
|
||||
+ str_append(str, "\r\n");
|
||||
+ (void)o_stream_send(client->output,
|
||||
+ str_data(str), str_len(str));
|
||||
|
||||
msg = t_strdup_printf("proxy(%s): started proxying to %s:%u",
|
||||
client->common.virtual_user,
|
@ -1,16 +0,0 @@
|
||||
$OpenBSD: patch-src_imap_cmd-store_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/imap/cmd-store.c.orig Sun May 18 22:36:46 2008
|
||||
+++ src/imap/cmd-store.c Sun May 18 22:37:13 2008
|
||||
@@ -86,6 +86,12 @@ bool cmd_store(struct client_command_context *cmd)
|
||||
if (search_arg == NULL)
|
||||
return TRUE;
|
||||
|
||||
+ if (mailbox_is_readonly(box)) {
|
||||
+ return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |
|
||||
+ (cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES),
|
||||
+ 0, "OK Store ignored with read-only mailbox.");
|
||||
+ }
|
||||
+
|
||||
t = mailbox_transaction_begin(box, !silent ? 0 :
|
||||
MAILBOX_TRANSACTION_FLAG_HIDE);
|
||||
keywords = keywords_list != NULL || modify_type == MODIFY_REPLACE ?
|
@ -1,15 +0,0 @@
|
||||
$OpenBSD: patch-src_lib-storage_index_index-mail_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/lib-storage/index/index-mail.c.orig Sun May 18 22:31:12 2008
|
||||
+++ src/lib-storage/index/index-mail.c Sun May 18 22:31:54 2008
|
||||
@@ -569,9 +569,8 @@ static void index_mail_parse_bodystructure(struct inde
|
||||
i_assert(data->parts->next == NULL);
|
||||
|
||||
old_offset = data->stream->v_offset;
|
||||
- i_stream_seek(data->stream,
|
||||
- data->hdr_size.physical_size);
|
||||
- message_parse_from_parts(data->parts->children,
|
||||
+ i_stream_seek(data->stream, 0);
|
||||
+ message_parse_from_parts(data->parts,
|
||||
data->stream,
|
||||
parse_bodystructure_part_header,
|
||||
mail->data_pool);
|
@ -1,24 +0,0 @@
|
||||
$OpenBSD: patch-src_lib-storage_index_mbox_mbox-storage_c,v 1.5 2008/05/28 23:08:03 sthen Exp $
|
||||
--- src/lib-storage/index/mbox/mbox-storage.c.orig Tue May 27 19:46:44 2008
|
||||
+++ src/lib-storage/index/mbox/mbox-storage.c Tue May 27 19:47:39 2008
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "ioloop.h"
|
||||
#include "buffer.h"
|
||||
#include "istream.h"
|
||||
+#include "restrict-access.h"
|
||||
#include "home-expand.h"
|
||||
#include "mkdir-parents.h"
|
||||
#include "unlink-directory.h"
|
||||
@@ -537,6 +538,12 @@ static int verify_inbox(struct index_storage *storage)
|
||||
|
||||
/* make sure inbox file itself exists */
|
||||
fd = open(storage->inbox_path, O_RDWR | O_CREAT | O_EXCL, 0660);
|
||||
+ if (fd == -1 && errno == EACCES) {
|
||||
+ /* try again with increased privileges */
|
||||
+ (void)restrict_access_use_priv_gid();
|
||||
+ fd = open(storage->inbox_path, O_RDWR | O_CREAT | O_EXCL, 0660);
|
||||
+ restrict_access_drop_priv_gid();
|
||||
+ }
|
||||
if (fd != -1)
|
||||
(void)close(fd);
|
||||
else if (errno == ENOTDIR &&
|
@ -1,49 +0,0 @@
|
||||
$OpenBSD: patch-src_lib_randgen_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/lib/randgen.c.orig Sun May 18 22:32:41 2008
|
||||
+++ src/lib/randgen.c Sun May 18 22:35:41 2008
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#ifdef HAVE_DEV_URANDOM
|
||||
|
||||
+#define URANDOM_PATH "/dev/urandom"
|
||||
+
|
||||
#include "fd-close-on-exec.h"
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
@@ -22,10 +24,16 @@ void random_fill(void *buf, size_t size)
|
||||
i_assert(init_refcount > 0);
|
||||
i_assert(size < SSIZE_T_MAX);
|
||||
|
||||
- for (pos = 0; pos < size; pos += ret) {
|
||||
+ for (pos = 0; pos < size; ) {
|
||||
ret = read(urandom_fd, (char *) buf + pos, size - pos);
|
||||
- if (ret < 0 && errno != EINTR)
|
||||
- i_fatal("Error reading from /dev/urandom: %m");
|
||||
+ if (ret <= 0) {
|
||||
+ if (ret == 0)
|
||||
+ i_fatal("EOF when reading from "URANDOM_PATH);
|
||||
+ else if (errno != EINTR)
|
||||
+ i_fatal("read("URANDOM_PATH") failed: %m");
|
||||
+ } else {
|
||||
+ pos += ret;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,13 +44,13 @@ void random_init(void)
|
||||
if (init_refcount++ > 0)
|
||||
return;
|
||||
|
||||
- urandom_fd = open("/dev/urandom", O_RDONLY);
|
||||
+ urandom_fd = open(URANDOM_PATH, O_RDONLY);
|
||||
if (urandom_fd == -1) {
|
||||
if (errno == ENOENT) {
|
||||
- i_fatal("/dev/urandom doesn't exist, "
|
||||
+ i_fatal(URANDOM_PATH" doesn't exist, "
|
||||
"currently we require it");
|
||||
} else {
|
||||
- i_fatal("Can't open /dev/urandom: %m");
|
||||
+ i_fatal("Can't open "URANDOM_PATH": %m");
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_login-common_ssl-proxy-openssl_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/login-common/ssl-proxy-openssl.c.orig Sun May 18 22:42:50 2008
|
||||
+++ src/login-common/ssl-proxy-openssl.c Sun May 18 22:43:22 2008
|
||||
@@ -307,8 +307,11 @@ static const char *ssl_last_error(void)
|
||||
size_t err_size = 256;
|
||||
|
||||
err = ERR_get_error();
|
||||
- if (err == 0)
|
||||
- return strerror(errno);
|
||||
+ if (err == 0) {
|
||||
+ if (errno != 0)
|
||||
+ return strerror(errno);
|
||||
+ return "Unknown error";
|
||||
+ }
|
||||
|
||||
buf = t_malloc(err_size);
|
||||
buf[err_size-1] = '\0';
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-src_plugins_acl_acl-cache_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/plugins/acl/acl-cache.c.orig Sun May 18 22:41:57 2008
|
||||
+++ src/plugins/acl/acl-cache.c Sun May 18 22:42:17 2008
|
||||
@@ -63,6 +63,8 @@ void acl_cache_deinit(struct acl_cache **_cache)
|
||||
struct acl_cache *cache = *_cache;
|
||||
|
||||
*_cache = NULL;
|
||||
+
|
||||
+ acl_cache_flush_all(cache);
|
||||
array_free(&cache->right_idx_name_map);
|
||||
hash_destroy(cache->right_name_idx_map);
|
||||
hash_destroy(cache->objects);
|
@ -1,13 +0,0 @@
|
||||
$OpenBSD: patch-src_pop3-login_pop3-proxy_c,v 1.1 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/pop3-login/pop3-proxy.c.orig Sun May 18 22:40:47 2008
|
||||
+++ src/pop3-login/pop3-proxy.c Sun May 18 22:41:24 2008
|
||||
@@ -99,8 +99,8 @@ static void proxy_input(struct istream *input, struct
|
||||
break;
|
||||
|
||||
/* Login successful. Send this line to client. */
|
||||
+ line = t_strconcat(line, "\r\n", NULL);
|
||||
(void)o_stream_send_str(client->output, line);
|
||||
- (void)o_stream_send(client->output, "\r\n", 2);
|
||||
|
||||
msg = t_strdup_printf("proxy(%s): started proxying to %s:%u",
|
||||
client->common.virtual_user,
|
@ -1,25 +0,0 @@
|
||||
$OpenBSD: patch-src_pop3_client_c,v 1.5 2008/05/22 07:55:08 sthen Exp $
|
||||
--- src/pop3/client.c.orig Sun May 18 22:37:55 2008
|
||||
+++ src/pop3/client.c Sun May 18 22:38:38 2008
|
||||
@@ -231,11 +231,20 @@ static const char *client_stats(struct client *client)
|
||||
return str_c(str);
|
||||
}
|
||||
|
||||
+static const char *client_get_disconnect_reason(struct client *client)
|
||||
+{
|
||||
+ errno = client->input->stream_errno != 0 ?
|
||||
+ client->input->stream_errno :
|
||||
+ client->output->stream_errno;
|
||||
+ return errno == 0 || errno == EPIPE ? "Connection closed" :
|
||||
+ t_strdup_printf("Connection closed: %m");
|
||||
+}
|
||||
+
|
||||
void client_destroy(struct client *client, const char *reason)
|
||||
{
|
||||
if (!client->disconnected) {
|
||||
if (reason == NULL)
|
||||
- reason = "Disconnected";
|
||||
+ reason = client_get_disconnect_reason(client);
|
||||
i_info("%s %s", reason, client_stats(client));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user