[tpop3d-discuss] segfault on bad password

Chris Lightfoot chris at ex-parrot.com
Sat, 8 Jun 2002 01:53:46 +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.

Ugh. It turns out to be a horrid medieval Solarisism.

On most systems,

    printf("%s\n", NULL);

results in `(null)' or `(nil)' or whatever. On SunOS 5.7,
it gives a SEGV. What happens is that the local_part is
NULL, and so the code in auth_ldap.c which prints the
`authentication failed' message causes a segmentation
fault.... It's no surprise I hadn't found this on another
system....

The fix is to make the reporting of usernames more
consistent, since the code in that case was wrong anyway.

-- 
The University of California Department of Statistics...
where mean is normal, and deviation standard