[tpop3d-discuss] segfault on bad password

prune prune at lecentre.net
Sat, 08 Jun 2002 11:04:52 +0200


--------------030002090203040007070308
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Chris Lightfoot wrote:

>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.
>
So the problem is solved ?


--------------030002090203040007070308
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
Chris Lightfoot wrote:<br>
<blockquote type="cite" cite="mid:20020608005346.GA13824@caesious.cold.local">
  <pre wrap="">On Thu, Jun 06, 2002 at 11:06:55AM -0400, Michael Klatsky wrote:<br></pre>
  <blockquote type="cite">
    <pre wrap="">To narrow it down further, it appears that the segfault occurs only when<br>doing the ldap auth using the filter:<br><br>auth-ldap-filter: (uid=$(user))<br><br><br>However, if I (in tpop3d.conf) add the lines:<br><br>append-domain: yes<br><br>and use the filter:<br><br>auth-ldap-filter: (uid=$(local_part))<br><br>it will work, although functionally, the above should be the same.<br>Weird.<br></pre>
    </blockquote>
    <pre wrap=""><!----><br>Ugh. It turns out to be a horrid medieval Solarisism.<br><br>On most systems,<br><br>    printf("%s\n", NULL);<br><br>results in `(null)' or `(nil)' or whatever. On SunOS 5.7,<br>it gives a SEGV. What happens is that the local_part is<br>NULL, and so the code in auth_ldap.c which prints the<br>`authentication failed' message causes a segmentation<br>fault.... It's no surprise I hadn't found this on another<br>system....<br><br>The fix is to make the reporting of usernames more<br>consistent, since the code in that case was wrong anyway.<br><br></pre>
    </blockquote>
So the problem is solved ?<br>
    <br>
    </body>
    </html>

--------------030002090203040007070308--