Fix $auth1 problem in dovecot authenticator.
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 23 Jan 2007 12:22:00 +0000 (12:22 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 23 Jan 2007 12:22:00 +0000 (12:22 +0000)
doc/doc-txt/ChangeLog
src/src/auths/dovecot.c

index 16ca18252384d96b69f027bc19130eee9b39b043..5b57e4251c49821abaa796d2744d97645f4ee650 100644 (file)
@@ -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
 -----------------
index e040bcf937d52d0a3226af833311e22d782986f1..61b0f0b4f2031be3eb99332f99c8d0f2b6333d93 100644 (file)
@@ -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 <pazke@donpac.ru>
@@ -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;
                        }