From f08724248e7a36fab313e332288de73165d07fe5 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 23 Jan 2007 12:22:00 +0000 Subject: [PATCH] Fix $auth1 problem in dovecot authenticator. --- doc/doc-txt/ChangeLog | 7 ++++++- src/src/auths/dovecot.c | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 16ca18252..5b57e4251 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.458 2007/01/23 11:01:09 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.459 2007/01/23 12:22:00 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -41,6 +41,11 @@ PH/06 Some tidies to the infrastructure of the Test Suite that is concerned including adding "make clean"; (3) Added -fPIC when compiling the test dynamically loaded module, to get rid of a warning. +PH/07 There was a bug in the dovecot authenticator such that the value of + $auth1 could be overwritten, and so not correctly preserved, after a + successful authentication. This usually meant that the value preserved by + the server_setid option was incorrect. + Exim version 4.66 ----------------- diff --git a/src/src/auths/dovecot.c b/src/src/auths/dovecot.c index e040bcf93..61b0f0b4f 100644 --- a/src/src/auths/dovecot.c +++ b/src/src/auths/dovecot.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/auths/dovecot.c,v 1.3 2006/10/16 15:44:36 ph10 Exp $ */ +/* $Cambridge: exim/src/src/auths/dovecot.c,v 1.4 2007/01/23 12:22:00 ph10 Exp $ */ /* * Copyright (c) 2004 Andrey Panin @@ -278,7 +278,8 @@ int auth_dovecot_server(auth_instance *ablock, uschar *data) uschar *p = US strchr(args[2], '='); if (p) { ++p; - expand_nstring[1] = auth_vars[0] = p; + expand_nstring[1] = auth_vars[0] = + string_copy(p); /* PH */ expand_nlength[1] = Ustrlen(p); expand_nmax = 1; } @@ -296,7 +297,8 @@ int auth_dovecot_server(auth_instance *ablock, uschar *data) OUT("authentication socket protocol error, username missing"); p++; - expand_nstring[1] = auth_vars[0] = p; + expand_nstring[1] = auth_vars[0] = + string_copy(p); /* PH */ expand_nlength[1] = Ustrlen(p); expand_nmax = 1; } -- 2.25.1