[Dovecot] dovecot-auth %c variable is not working

Andrey Panin pazke at donpac.ru
Thu Apr 19 22:23:15 EEST 2007


On 109, 04 19, 2007 at 12:17:41PM -0400, Bill Boebel wrote:
> In "doc/variables.txt"
> 
> > For dovecot-auth there are also these variables:
> > 
> >  %c - "secured" string with SSL, TLS and localhost connections.
> >       Otherwise empty.
> 
> %c does not appear to be working.  I am trying to use it in a MySQL query userdb and passdb query and it is always empty string.

You just got "First bug reported for Dovecot 1.0.0" award :)

Seems like secured flag isn't passed to blocking passdb handler.
Can you try attached patch ?


-- 
Andrey Panin		| Linux and UNIX system administrator
pazke at donpac.ru		| PGP key: wwwkeys.pgp.net
-------------- next part --------------
diff -urdpNX /usr/share/dontdiff dovecot-1.0.0.vanilla/src/auth/auth-request.c dovecot-1.0.0/src/auth/auth-request.c
--- dovecot-1.0.0.vanilla/src/auth/auth-request.c	2007-03-25 22:30:26.000000000 +0400
+++ dovecot-1.0.0/src/auth/auth-request.c	2007-04-19 23:09:28.000000000 +0400
@@ -133,6 +133,9 @@ void auth_request_export(struct auth_req
 		str_append(str, "\trip=");
 		str_append(str, net_ip2addr(&request->remote_ip));
 	}
+	if (request->secured) {
+		str_append(str, "\tsecured=1");
+	}
 }
 
 bool auth_request_import(struct auth_request *request,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20070419/e7febcce/attachment.pgp 


More information about the dovecot mailing list