changeset 3687:629ffe1a3874 HEAD

%w contains now password
author Timo Sirainen <tss@iki.fi>
date Thu, 27 Oct 2005 18:57:28 +0300
parents 1b86be09b41e
children 1e6af9a000e6
files doc/variables.txt src/auth/auth-request.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/variables.txt	Thu Oct 27 18:44:23 2005 +0300
+++ b/doc/variables.txt	Thu Oct 27 18:57:28 2005 +0300
@@ -15,6 +15,7 @@
  %p - PID of the current process (login or imap/pop3 process)
  %l - local IP address
  %r - remote IP address
+ %w - plaintext password from plaintext authentication mechanism
 
 You can apply a modifiers for each variable (eg. %Lp = pop3):
 
--- a/src/auth/auth-request.c	Thu Oct 27 18:44:23 2005 +0300
+++ b/src/auth/auth-request.c	Thu Oct 27 18:57:28 2005 +0300
@@ -594,6 +594,7 @@
 		{ 'l', NULL },
 		{ 'r', NULL },
 		{ 'p', NULL },
+		{ 'w', NULL },
 		{ '\0', NULL }
 	};
 	struct var_expand_table *tab;
@@ -616,6 +617,8 @@
 	if (auth_request->remote_ip.family != 0)
 		tab[6].value = net_ip2addr(&auth_request->remote_ip);
 	tab[7].value = dec2str(auth_request->client_pid);
+	if (auth_request->mech_password != NULL)
+		tab[8].value = escape_func(auth_request->mech_password);
 	return tab;
 }