[tpop3d-discuss] segfault on bad password

Chris Lightfoot chris at ex-parrot.com
Thu, 6 Jun 2002 16:19:53 +0100


On Thu, Jun 06, 2002 at 11:06:55AM -0400, Michael Klatsky wrote:
> To narrow it down further, it appears that the segfault occurs only when
> doing the ldap auth using the filter:
> 
> auth-ldap-filter: (uid=$(user))
> 
> 
> However, if I (in tpop3d.conf) add the lines:
> 
> append-domain: yes
> 
> and use the filter:
> 
> auth-ldap-filter: (uid=$(local_part))
> 
> it will work, although functionally, the above should be the same.
> Weird.

Hmm. Can you apply the following patch and see if it fixes
that problem:

--- auth_ldap.c 2002/05/09 22:26:49     1.6
+++ auth_ldap.c 2002/06/06 15:18:47
@@ -453,7 +453,7 @@
     if (domain)
         d = xstrdup(ldap_escape(domain));
 
-    filter = substitute_variables(template, &err, 3, "user", user, "local_part", l, "domain", d);
+    filter = substitute_variables(template, &err, 3, "user", u, "local_part", l, "domain", d);
 
     if (!filter && err.code != sv_nullvalue)
         log_print(LOG_ERR, _("substitute_filter_params: %s near `%.16s'"), err.msg, template + err.offset);


> One other note, which I believe is separate- it doesn't appear that
> tpop3d is releasing it's connections- I've got 160 connections in
> TIME_WAIT since about 1:30 am when we put the popper into place. And we
> only have around 2,000 users on this box. 

Hmm. That's not good. Do you mean user -> tpop3d
connections or tpop3d -> ldap connections?

-- 
If we couldn't laugh at things that didn't make sense,
we couldn't react to a lot of the world around us. (Calvin and Hobbes)