[packages/dovecot] - rel 3; initialize auth settings earlier if we want custom per protocol settings to be working
arekm
arekm at pld-linux.org
Wed Aug 20 14:46:13 CEST 2014
commit 1b80c26c039bcf5528ac24d736348a8e6f8921b3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 20 14:46:05 2014 +0200
- rel 3; initialize auth settings earlier if we want custom per protocol settings to be working
dovecot-auth-settings.patch | 69 +++++++++++++++++++++++++++++++++++++++++++++
dovecot.spec | 4 ++-
2 files changed, 72 insertions(+), 1 deletion(-)
---
diff --git a/dovecot.spec b/dovecot.spec
index ba4c4c3..256988a 100644
--- a/dovecot.spec
+++ b/dovecot.spec
@@ -11,7 +11,7 @@ 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.13
-Release: 2
+Release: 3
Epoch: 1
License: MIT (libraries), LGPL v2.1 (the rest)
Group: Networking/Daemons
@@ -23,6 +23,7 @@ Source3: %{name}.sysconfig
Source4: %{name}.tmpfiles
Patch0: %{name}-config.patch
Patch1: %{name}-rpath.patch
+Patch2: %{name}-auth-settings.patch
URL: http://dovecot.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -147,6 +148,7 @@ Współdzielone biblioteki Dovecota.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
diff --git a/dovecot-auth-settings.patch b/dovecot-auth-settings.patch
new file mode 100644
index 0000000..cdd8361
--- /dev/null
+++ b/dovecot-auth-settings.patch
@@ -0,0 +1,69 @@
+
+# HG changeset patch
+# User Timo Sirainen <tss at iki.fi>
+# Date 1408538127 -7200
+# Node ID c3da5ffaa0f259711fcaf8334b1998a3af77dc62
+# Parent febedba15c7ebc87a90de5bc935783eb42438126
+auth: protocol-specific username settings weren't used for userdb lookups.
+The username was set before the service-specific settings were looked up, so
+global settings were always used. This affected auth_default_realm,
+auth_username_translation and auth_username_format settings.
+
+diff -r febedba15c7e -r c3da5ffaa0f2 src/auth/auth-master-connection.c
+--- a/src/auth/auth-master-connection.c Wed Aug 20 14:22:28 2014 +0300
++++ b/src/auth/auth-master-connection.c Wed Aug 20 14:35:27 2014 +0200
+@@ -167,7 +167,7 @@
+ const char **error_r)
+ {
+ struct auth_request *auth_request;
+- const char *const *list, *name, *arg;
++ const char *const *list, *name, *arg, *username;
+ unsigned int id;
+
+ /* <id> <userid> [<parameters>] */
+@@ -182,11 +182,7 @@
+ auth_request->id = id;
+ auth_request->master = conn;
+ auth_master_connection_ref(conn);
+-
+- if (!auth_request_set_username(auth_request, list[1], error_r)) {
+- *request_r = auth_request;
+- return 0;
+- }
++ username = list[1];
+
+ for (list += 2; *list != NULL; list++) {
+ arg = strchr(*list, '=');
+@@ -209,6 +205,11 @@
+ }
+
+ auth_request_init(auth_request);
++
++ if (!auth_request_set_username(auth_request, username, error_r)) {
++ *request_r = auth_request;
++ return 0;
++ }
+ *request_r = auth_request;
+ return 1;
+ }
+diff -r febedba15c7e -r c3da5ffaa0f2 src/auth/auth-postfix-connection.c
+--- a/src/auth/auth-postfix-connection.c Wed Aug 20 14:22:28 2014 +0300
++++ b/src/auth/auth-postfix-connection.c Wed Aug 20 14:35:27 2014 +0200
+@@ -51,13 +51,13 @@
+ auth_request->context = conn;
+ auth_postfix_connection_ref(conn);
+
++ (void)auth_request_import_info(auth_request, "service", "postfix");
++ auth_request_init(auth_request);
++
+ if (!auth_request_set_username(auth_request, username, error_r)) {
+ *request_r = auth_request;
+ return FALSE;
+ }
+- (void)auth_request_import_info(auth_request, "service", "postfix");
+-
+- auth_request_init(auth_request);
+ *request_r = auth_request;
+ return TRUE;
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dovecot.git/commitdiff/1b80c26c039bcf5528ac24d736348a8e6f8921b3
More information about the pld-cvs-commit
mailing list