]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
checkpassword: Set TCPLOCALPORT and TCPREMOTEPORT environments.
authorTimo Sirainen <tss@iki.fi>
Wed, 23 Jul 2008 23:21:51 +0000 (02:21 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 23 Jul 2008 23:21:51 +0000 (02:21 +0300)
--HG--
branch : HEAD

src/auth/passdb-checkpassword.c

index 60977ad6807ab5375ef21f6efba81d3e8ceaa9c6..76ffe4e93f9f573c61082fbc044b9e653f3853f2 100644 (file)
@@ -246,6 +246,14 @@ checkpassword_verify_plain_child(struct auth_request *request,
                                            net_ip2addr(&request->remote_ip),
                                            NULL));
                }
+               if (request->local_port != 0) {
+                       env_put(t_strdup_printf("TCPLOCALPORT=%u",
+                                               request->local_port));
+               }
+               if (request->remote_port != 0) {
+                       env_put(t_strdup_printf("TCPREMOTEPORT=%u",
+                                               request->remote_port));
+               }
                if (request->master_user != NULL) {
                        env_put(t_strconcat("MASTER_USER=",
                                            request->master_user, NULL));