Gentoo Archives: gentoo-commits

From: "Wolfram Schlich (wschlich)" <wschlich@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/dovecot/files: dovecot-1.1.10-498022697a33.patch
Date: Mon, 02 Feb 2009 11:18:39
Message-Id: E1LTwp3-0003GZ-RQ@stork.gentoo.org
1 wschlich 09/02/02 11:18:37
2
3 Added: dovecot-1.1.10-498022697a33.patch
4 Log:
5 add passdb field fix
6 (Portage version: 2.2_rc13/cvs/Linux 2.6.24-gentoo-r5-1 i686)
7
8 Revision Changes Path
9 1.1 net-mail/dovecot/files/dovecot-1.1.10-498022697a33.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/files/dovecot-1.1.10-498022697a33.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/files/dovecot-1.1.10-498022697a33.patch?rev=1.1&content-type=text/plain
13
14 Index: dovecot-1.1.10-498022697a33.patch
15 ===================================================================
16
17 # HG changeset patch
18 # User Timo Sirainen <tss@×××.fi>
19 # Date 1233425646 -7200
20 # Node ID 498022697a33e7c6a4db2e9e7db763ffc5552872
21 # Parent f97cd7e3acda5a4b707cde9837c55a8cd48d2d8d
22 auth: Using "username" or "domain" passdb fields caused problems with cache and blocking passdbs.
23
24 --- a/src/auth/auth-request.c Thu Jan 29 19:25:02 2009 -0500
25 +++ b/src/auth/auth-request.c Sat Jan 31 20:14:06 2009 +0200
26 @@ -1006,7 +1006,7 @@ void auth_request_set_field(struct auth_
27 const char *name, const char *value,
28 const char *default_scheme)
29 {
30 - const char *p;
31 + const char *p, *orig_value;
32
33 i_assert(*name != '\0');
34 i_assert(value != NULL);
35 @@ -1024,6 +1024,7 @@ void auth_request_set_field(struct auth_
36 if (strcmp(name, "user") == 0 ||
37 strcmp(name, "username") == 0 || strcmp(name, "domain") == 0) {
38 /* update username */
39 + orig_value = value;
40 if (strcmp(name, "username") == 0 &&
41 strchr(value, '@') == NULL &&
42 (p = strchr(request->user, '@')) != NULL) {
43 @@ -1054,6 +1055,9 @@ void auth_request_set_field(struct auth_
44 request->user, value);
45 request->user = p_strdup(request->pool, value);
46 }
47 + /* restore the original value so it gets saved correctly to
48 + cache. */
49 + value = orig_value;
50 } else if (strcmp(name, "nodelay") == 0) {
51 /* don't delay replying to client of the failure */
52 request->no_failure_delay = TRUE;