[packages/dovecot] - up to 2.2.26

arekm arekm at pld-linux.org
Thu Oct 27 15:47:13 CEST 2016


commit 7c971c8937e17135dc07078cc138728ee1b59023
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Oct 27 15:47:07 2016 +0200

    - up to 2.2.26

 dovecot-local-name.patch | 280 -----------------------------------------------
 dovecot.spec             |  10 +-
 2 files changed, 5 insertions(+), 285 deletions(-)
---
diff --git a/dovecot.spec b/dovecot.spec
index bef186d..a7b6910 100644
--- a/dovecot.spec
+++ b/dovecot.spec
@@ -11,20 +11,20 @@
 Summary:	IMAP and POP3 server written with security primarily in mind
 Summary(pl.UTF-8):	Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
 Name:		dovecot
-Version:	2.2.25
-Release:	5
+Version:	2.2.26
+Release:	1
 Epoch:		1
 License:	MIT (libraries), LGPL v2.1 (the rest)
 Group:		Networking/Daemons
 Source0:	http://dovecot.org/releases/2.2/%{name}-%{version}.tar.gz
-# Source0-md5:	8f62ea76489c47c369cbbe0b19818448
+# Source0-md5:	54d96c68316cd75432e1f4234ecc82d9
 Source1:	%{name}.pamd
 Source2:	%{name}.init
 Source3:	%{name}.sysconfig
 Source4:	%{name}.tmpfiles
 Patch0:		%{name}-config.patch
 Patch1:		%{name}-rpath.patch
-Patch2:		%{name}-local-name.patch
+
 Patch3:		%{name}-disableSSLv3.patch
 Patch4:		dovecot-bad-assert.patch
 URL:		http://dovecot.org/
@@ -159,7 +159,7 @@ Współdzielone biblioteki Dovecota.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+
 %patch3 -p2
 %patch4 -p1
 
diff --git a/dovecot-local-name.patch b/dovecot-local-name.patch
deleted file mode 100644
index 2e7f16d..0000000
--- a/dovecot-local-name.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-commit 8e104e2bce03c1cb410b1aff5100a0e1074c11ca
-Author: Aki Tuomi <aki.tuomi at dovecot.fi>
-Date:   Mon Oct 17 23:25:27 2016 +0300
-
-    lib: Add null_strcasecmp
-
-diff --git a/src/lib/strfuncs.c b/src/lib/strfuncs.c
-index 602ceb4..df572ff 100644
---- a/src/lib/strfuncs.c
-+++ b/src/lib/strfuncs.c
-@@ -434,6 +434,16 @@ int null_strcmp(const char *s1, const char *s2)
- 	return strcmp(s1, s2);
- }
- 
-+int null_strcasecmp(const char *s1, const char *s2)
-+{
-+        if (s1 == NULL)
-+                return s2 == NULL ? 0 : -1;
-+        if (s2 == NULL)
-+                return 1;
-+
-+        return strcasecmp(s1, s2);
-+}
-+
- int i_memcasecmp(const void *p1, const void *p2, size_t size)
- {
- 	const unsigned char *s1 = p1;
-diff --git a/src/lib/strfuncs.h b/src/lib/strfuncs.h
-index c84533b..65203f2 100644
---- a/src/lib/strfuncs.h
-+++ b/src/lib/strfuncs.h
-@@ -60,6 +60,7 @@ const char *t_str_rtrim(const char *str, const char *chars);
- /*const char *t_str_trim(const char *str, const char *chars);*/
- 
- int null_strcmp(const char *s1, const char *s2) ATTR_PURE;
-+int null_strcasecmp(const char *s1, const char *s2) ATTR_PURE;
- int bsearch_strcmp(const char *key, const char *const *member) ATTR_PURE;
- int bsearch_strcasecmp(const char *key, const char *const *member) ATTR_PURE;
- int i_memcasecmp(const void *p1, const void *p2, size_t size) ATTR_PURE;
-From c19c44f87ef3fe40cae4be9a86ee9327a7370e46 Mon Sep 17 00:00:00 2001
-From: Aki Tuomi <aki.tuomi at dovecot.fi>
-Date: Sat, 15 Oct 2016 23:04:35 +0300
-Subject: [PATCH] config: Compare local_name case insensitive
-
-DNS and certificate names should be compared
-case insensitive.
----
- src/config/config-filter.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/config/config-filter.c b/src/config/config-filter.c
-index e8cc010..87a24da 100644
---- a/src/config/config-filter.c
-+++ b/src/config/config-filter.c
-@@ -36,7 +36,7 @@ static bool config_filter_match_rest(const struct config_filter *mask,
- 	if (mask->local_name != NULL) {
- 		if (filter->local_name == NULL)
- 			return FALSE;
--		if (strcmp(filter->local_name, mask->local_name) != 0)
-+		if (strcasecmp(filter->local_name, mask->local_name) != 0)
- 			return FALSE;
- 	}
- 	/* FIXME: it's not comparing full masks */
-@@ -82,7 +82,7 @@ bool config_filters_equal(const struct config_filter *f1,
- 	if (!net_ip_compare(&f1->local_net, &f2->local_net))
- 		return FALSE;
- 
--	if (null_strcmp(f1->local_name, f2->local_name) != 0)
-+	if (null_strcasecmp(f1->local_name, f2->local_name) != 0)
- 		return FALSE;
- 
- 	return TRUE;
-From fe791e96fdf796f7d8997ee0515b163dc5eddd72 Mon Sep 17 00:00:00 2001
-From: Aki Tuomi <aki.tuomi at dovecot.fi>
-Date: Tue, 18 Oct 2016 00:37:32 +0300
-Subject: [PATCH] auth: Pass local_name to auth-request
-
-This allows using local_name in various places,
-such as passdb/userdb queries.
----
- src/auth/auth-request-var-expand.c   | 5 +++++
- src/auth/auth-request-var-expand.h   | 2 +-
- src/auth/auth-request.c              | 4 ++++
- src/auth/auth-request.h              | 2 +-
- src/lib-auth/auth-client-request.c   | 4 +++-
- src/lib-auth/auth-client.h           | 1 +
- src/login-common/client-common.h     | 1 +
- src/login-common/login-settings.c    | 2 ++
- src/login-common/sasl-server.c       | 1 +
- src/login-common/ssl-proxy-openssl.c | 1 +
- 10 files changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/src/auth/auth-request-var-expand.c b/src/auth/auth-request-var-expand.c
-index 312d393..4fd2dcb 100644
---- a/src/auth/auth-request-var-expand.c
-+++ b/src/auth/auth-request-var-expand.c
-@@ -45,6 +45,7 @@ auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_COUNT+1] = {
- 	{ '\0', NULL, "auth_user" },
- 	{ '\0', NULL, "auth_username" },
- 	{ '\0', NULL, "auth_domain" },
-+	{ '\0', NULL, "local_name" },
- 	/* be sure to update AUTH_REQUEST_VAR_TAB_COUNT */
- 	{ '\0', NULL, NULL }
- };
-@@ -166,6 +167,10 @@ auth_request_get_var_expand_table_full(const struct auth_request *auth_request,
- 	tab[32].value = strchr(auth_user, '@');
- 	if (tab[32].value != NULL)
- 		tab[32].value = escape_func(tab[32].value+1, auth_request);
-+	if (auth_request->local_name != NULL)
-+		tab[33].value = escape_func(auth_request->local_name, auth_request);
-+	else
-+		tab[33].value = "";
- 	return ret_tab;
- }
- 
-diff --git a/src/auth/auth-request-var-expand.h b/src/auth/auth-request-var-expand.h
-index a7cafdd..0d228da 100644
---- a/src/auth/auth-request-var-expand.h
-+++ b/src/auth/auth-request-var-expand.h
-@@ -8,7 +8,7 @@ auth_request_escape_func_t(const char *string,
- #define AUTH_REQUEST_VAR_TAB_USER_IDX 0
- #define AUTH_REQUEST_VAR_TAB_USERNAME_IDX 1
- #define AUTH_REQUEST_VAR_TAB_DOMAIN_IDX 2
--#define AUTH_REQUEST_VAR_TAB_COUNT 33
-+#define AUTH_REQUEST_VAR_TAB_COUNT 34
- extern const struct var_expand_table
- auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_COUNT+1];
- 
-diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c
-index 7a60c97..8b38f83 100644
---- a/src/auth/auth-request.c
-+++ b/src/auth/auth-request.c
-@@ -319,6 +319,8 @@ void auth_request_export(struct auth_request *request, string_t *dest)
- 		str_printfa(dest, "\treal_lport=%u", request->real_local_port);
- 	if (request->real_remote_port != 0)
- 		str_printfa(dest, "\treal_rport=%u", request->real_remote_port);
-+	if (request->local_name != 0)
-+		str_printfa(dest, "\tlocal_name=%s", request->local_name);
- 	if (request->session_id != NULL)
- 		str_printfa(dest, "\tsession=%s", request->session_id);
- 	if (request->debug)
-@@ -377,6 +379,8 @@ bool auth_request_import_info(struct auth_request *request,
- 		(void)net_str2port(value, &request->real_local_port);
- 	else if (strcmp(key, "real_rport") == 0)
- 		(void)net_str2port(value, &request->real_remote_port);
-+	else if (strcmp(key, "local_name") == 0)
-+		request->local_name = p_strdup(request->pool, value);
- 	else if (strcmp(key, "session") == 0)
- 		request->session_id = p_strdup(request->pool, value);
- 	else if (strcmp(key, "debug") == 0)
-diff --git a/src/auth/auth-request.h b/src/auth/auth-request.h
-index 54772ee..63fb838 100644
---- a/src/auth/auth-request.h
-+++ b/src/auth/auth-request.h
-@@ -74,7 +74,7 @@ struct auth_request {
- 	time_t delay_until;
- 	pid_t session_pid;
- 
--	const char *service, *mech_name, *session_id;
-+	const char *service, *mech_name, *session_id, *local_name;
- 	struct ip_addr local_ip, remote_ip, real_local_ip, real_remote_ip;
- 	in_port_t local_port, remote_port, real_local_port, real_remote_port;
- 
-diff --git a/src/lib-auth/auth-client-request.c b/src/lib-auth/auth-client-request.c
-index fde65bf..968dc98 100644
---- a/src/lib-auth/auth-client-request.c
-+++ b/src/lib-auth/auth-client-request.c
-@@ -80,7 +80,9 @@ static void auth_server_send_new_request(struct auth_server_connection *conn,
- 	if (info->real_remote_port != 0 &&
- 	    info->real_remote_port != info->remote_port)
- 		str_printfa(str, "\treal_rport=%u", info->real_remote_port);
--
-+	if (info->local_name != NULL &&
-+	    *info->local_name != '\0')
-+		str_printfa(str, "\tlocal_name=%s", info->local_name);
- 	if (info->initial_resp_base64 != NULL) {
- 		str_append(str, "\tresp=");
- 		str_append_tabescaped(str, info->initial_resp_base64);
-diff --git a/src/lib-auth/auth-client.h b/src/lib-auth/auth-client.h
-index 59cf3d4..45b346b 100644
---- a/src/lib-auth/auth-client.h
-+++ b/src/lib-auth/auth-client.h
-@@ -41,6 +41,7 @@ struct auth_request_info {
- 	const char *service;
- 	const char *session_id;
- 	const char *cert_username;
-+	const char *local_name;
- 	enum auth_request_flags flags;
- 
- 	struct ip_addr local_ip, remote_ip, real_local_ip, real_remote_ip;
-diff --git a/src/login-common/client-common.h b/src/login-common/client-common.h
-index 715c22f..864af1c 100644
---- a/src/login-common/client-common.h
-+++ b/src/login-common/client-common.h
-@@ -117,6 +117,7 @@ struct client {
- 	const struct login_settings *set;
- 	const struct master_service_ssl_settings *ssl_set;
- 	const char *session_id, *listener_name, *postlogin_socket_path;
-+	const char *local_name;
- 
- 	int fd;
- 	struct istream *input;
-diff --git a/src/login-common/login-settings.c b/src/login-common/login-settings.c
-index 05be020..ace5dae 100644
---- a/src/login-common/login-settings.c
-+++ b/src/login-common/login-settings.c
-@@ -120,6 +120,7 @@ login_set_var_expand_table(const struct master_service_settings_input *input)
- 		{ 'r', NULL, "rip" },
- 		{ 'p', NULL, "pid" },
- 		{ 's', NULL, "service" },
-+		{ '\0', NULL, "local_name" },
- 		{ '\0', NULL, NULL }
- 	};
- 	struct var_expand_table *tab;
-@@ -131,6 +132,7 @@ login_set_var_expand_table(const struct master_service_settings_input *input)
- 	tab[1].value = net_ip2addr(&input->remote_ip);
- 	tab[2].value = my_pid;
- 	tab[3].value = input->service;
-+	tab[4].value = input->local_name;
- 	return tab;
- }
- 
-diff --git a/src/login-common/sasl-server.c b/src/login-common/sasl-server.c
-index 5d6d29c..097b83d 100644
---- a/src/login-common/sasl-server.c
-+++ b/src/login-common/sasl-server.c
-@@ -360,6 +360,7 @@ void sasl_server_auth_begin(struct client *client,
- 	info.local_ip = client->local_ip;
- 	info.remote_ip = client->ip;
- 	info.local_port = client->local_port;
-+	info.local_name = client->local_name;
- 	info.remote_port = client->remote_port;
- 	info.real_local_ip = client->real_local_ip;
- 	info.real_remote_ip = client->real_remote_ip;
-diff --git a/src/login-common/ssl-proxy-openssl.c b/src/login-common/ssl-proxy-openssl.c
-index 0f17fad..a17ce66 100644
---- a/src/login-common/ssl-proxy-openssl.c
-+++ b/src/login-common/ssl-proxy-openssl.c
-@@ -1149,6 +1149,7 @@ static void ssl_servername_callback(SSL *ssl, int *al ATTR_UNUSED,
- 						  &client->ssl_set,
- 						  &other_sets);
- 	}
-+	client->local_name = p_strdup(client->pool, host);
- 	ctx = ssl_server_context_get(client->set, client->ssl_set);
- 	SSL_set_SSL_CTX(ssl, ctx->ctx);
- }
->From 066edb5e5c14a05c90e9ae63f0b76fcfd9c1149e Mon Sep 17 00:00:00 2001
-From: Aki Tuomi <aki.tuomi at dovecot.fi>
-Date: Thu, 20 Oct 2016 16:06:27 +0300
-Subject: [PATCH] login-common: Include local_name in login_var_expand_table
-
-This way it can be used in login_log_format
----
- src/login-common/client-common.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/login-common/client-common.c b/src/login-common/client-common.c
-index d0a9c52..5964ec9 100644
---- a/src/login-common/client-common.c
-+++ b/src/login-common/client-common.c
-@@ -507,6 +507,7 @@ static struct var_expand_table login_var_expand_empty_tab[] = {
- 	{ '\0', NULL, "auth_username" },
- 	{ '\0', NULL, "auth_domain" },
- 	{ '\0', NULL, "listener" },
-+	{ '\0', NULL, "local_name" },
- 	{ '\0', NULL, NULL }
- };
- 
-@@ -581,6 +582,7 @@ get_var_expand_table(struct client *client)
- 		tab[24].value = tab[21].value;
- 	}
- 	tab[25].value = client->listener_name;
-+	tab[26].value = client->local_name == NULL ? "" : client->local_name;
- 	return tab;
- }
- 
--- 
-2.7.4
-
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dovecot.git/commitdiff/7c971c8937e17135dc07078cc138728ee1b59023



More information about the pld-cvs-commit mailing list