[dovecot-cvs] dovecot/src/auth passdb-checkpassword.c,1.25,1.26
tss at dovecot.org
tss at dovecot.org
Thu Nov 2 21:34:51 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv10605
Modified Files:
passdb-checkpassword.c
Log Message:
Give TCPLOCALIP and TCPREMOTEIP and PROTO=TCP environments to checkpassword
binary so we're UCSPI (and vchkpw) compatible.
Index: passdb-checkpassword.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-checkpassword.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- passdb-checkpassword.c 22 Aug 2006 02:49:53 -0000 1.25
+++ passdb-checkpassword.c 2 Nov 2006 21:34:49 -0000 1.26
@@ -215,14 +215,26 @@
/* Besides passing the standard username and password in a
pipe, also pass some other possibly interesting information
- via environment. */
+ via environment. Use UCSPI names for local/remote IPs. */
+ /* */
+ env_put("PROTO=TCP"); /* UCSPI */
env_put(t_strconcat("SERVICE=", request->service, NULL));
if (request->local_ip.family != 0) {
+ env_put(t_strconcat("TCPLOCALIP=",
+ net_ip2addr(&request->local_ip),
+ NULL));
+ /* FIXME: for backwards compatibility only,
+ remove some day */
env_put(t_strconcat("LOCAL_IP=",
net_ip2addr(&request->local_ip),
NULL));
}
if (request->remote_ip.family != 0) {
+ env_put(t_strconcat("TCPREMOTEIP=",
+ net_ip2addr(&request->remote_ip),
+ NULL));
+ /* FIXME: for backwards compatibility only,
+ remove some day */
env_put(t_strconcat("REMOTE_IP=",
net_ip2addr(&request->remote_ip),
NULL));
More information about the dovecot-cvs
mailing list