]> git.pld-linux.org Git - packages/dovecot.git/commitdiff
- rel 3; initialize auth settings earlier if we want custom per protocol settings... auto/th/dovecot-2.2.13-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 20 Aug 2014 12:46:05 +0000 (14:46 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 20 Aug 2014 12:46:05 +0000 (14:46 +0200)
dovecot-auth-settings.patch [new file with mode: 0644]
dovecot.spec

diff --git a/dovecot-auth-settings.patch b/dovecot-auth-settings.patch
new file mode 100644 (file)
index 0000000..cdd8361
--- /dev/null
@@ -0,0 +1,69 @@
+
+# HG changeset patch
+# User Timo Sirainen <tss@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;
+ }
+
index ba4c4c389baf7006926ed176517112fd80b527a7..256988a91cf837a5aaf728a2256c62c0b9b44179 100644 (file)
@@ -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
 
This page took 0.120068 seconds and 4 git commands to generate.