If the auth backend (postgresql in my case) returns extra fields, and
all of these extra_fields begin with 'userdb_', the auth_callback
functions adds an unwanted extra tab at the end of the response:
auth(default): client out: OK^I8^Iuser=foo at bar^I
This extra tab at the end confuses exim's dovecot-auth handler (the
exim-dovecot auth handler does not correctly count the number of
returned fields then (side note: the code on exim's side should
probably be cleaned up as well)).
A quick fix is attached below.
Chris
--- src/auth/auth-request-handler.c.orig 2006-11-03
13:10:35.000000000 +0100
+++ src/auth/auth-request-handler.c 2006-11-03 13:08:32.000000000 +0100
@@ -139,6 +139,10 @@
str_append(str, fields[src]);
}
}
+
+ if (str_len(str) == 0)
+ return NULL;
+
return str_c(str);
}
On Fri, 2006-11-03 at 13:22 +0100, Chris Laif wrote:> If the auth backend (postgresql in my case) returns extra fields, and > all of these extra_fields begin with 'userdb_', the auth_callback > functions adds an unwanted extra tab at the end of the response: > > auth(default): client out: OK^I8^Iuser=foo at bar^I > > This extra tab at the end confuses exim's dovecot-auth handler (the > exim-dovecot auth handler does not correctly count the number of > returned fields then (side note: the code on exim's side should > probably be cleaned up as well)). > > A quick fix is attached below.Thanks, fixed. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://dovecot.org/pipermail/dovecot/attachments/20061104/895650a9/attachment.pgp